Skip to content

Commit 696a55b

Browse files
committed
Don't pop the eyes
1 parent bef86e8 commit 696a55b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

components/Eyes/Eyes.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const Eyes = () => {
1111
const eyeRefs = useRef<NodeListOf<HTMLDivElement>>()
1212
const [cursorPos, setCursorPos] = useState<{ x: number, y: number }>()
1313
const [points, setPoints] = useState<[number, number][]>([])
14+
const amountPopped = useRef(0)
1415

1516
useEffect(() => {
1617
const bbox = containerRef.current?.getBoundingClientRect()
@@ -69,6 +70,17 @@ const Eyes = () => {
6970
const target = e.currentTarget
7071
target.dataset.popped = 'true'
7172
window.setTimeout(() => target.dataset.popped = 'false', 5000)
73+
74+
amountPopped.current++
75+
const cStyle = 'font-weight: bold; color: #14072E;'
76+
if (amountPopped.current === 3) console.log('%couch', cStyle)
77+
if (amountPopped.current === 10) console.log('%cplease stop 😭', cStyle)
78+
if (amountPopped.current === 25) console.log('%cyou\'re determined, i\'ll give you that', cStyle)
79+
if (amountPopped.current === 50) console.log('%ci only have so many eyes >.>', cStyle)
80+
if (amountPopped.current === 75) console.log('%cand i am running out', cStyle)
81+
if (amountPopped.current === 99) console.log('%cokok relax', cStyle)
82+
if (amountPopped.current === 100) console.log('%chere\'s a cool webcomic: https://sas.ewanb.me', cStyle)
83+
if (amountPopped.current === 110) console.log('%cno seriously there\'s nothing else', cStyle)
7284
}}
7385
/>), [points])
7486

0 commit comments

Comments
 (0)