diff --git a/components/POAPModal/Creeper.tsx b/components/POAPModal/Creeper.tsx index 5118127..1b0c04b 100644 --- a/components/POAPModal/Creeper.tsx +++ b/components/POAPModal/Creeper.tsx @@ -1,14 +1,27 @@ +/* eslint-disable sonarjs/no-identical-functions */ /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */ 'use client'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; export const Creeper = () => { const [blinkAnimationTriggered, setBlinkAnimationTriggered] = useState(false); + // every 5 seconds, blink + useEffect(() => { + const interval = setInterval(() => { + setBlinkAnimationTriggered(true); + setTimeout(() => { + setBlinkAnimationTriggered(false); + }, 250); + }, 10_000); + + return () => clearInterval(interval); + }, [0]); + return (