mirror of
https://github.com/pykeio/ort
synced 2026-04-26 00:44:56 +02:00
16 lines
506 B
TypeScript
16 lines
506 B
TypeScript
'use client';
|
|
|
|
import { usePathname } from 'next/navigation';
|
|
import { useEffect, useState } from 'react';
|
|
|
|
const FOOTER_EMOJIS = [ '💜', '🩷', '💜', '🩷', '💜', '🩷', '💜', '🩷', '☕', '👽', '🦀', '🌈', '🏳️⚧️' ];
|
|
|
|
export default function FooterEmoji() {
|
|
const route = usePathname();
|
|
const [ emoji, setEmoji ] = useState(FOOTER_EMOJIS[0]);
|
|
useEffect(() => {
|
|
setEmoji(FOOTER_EMOJIS[Math.floor(Math.random() * FOOTER_EMOJIS.length)]);
|
|
}, [ route ]);
|
|
return emoji;
|
|
}
|