'use client' import Shortcut from '@/components/shortcut' import { Input } from '@/components/ui/input' import { Flame, Radius, Search } from 'lucide-react' import { useEffect, useState } from 'react' import { useRouter } from 'next/navigation' import { Item } from '@/lib/types' import store from 'store2' export default function Home() { const router = useRouter() const [shortcuts, setShortcuts] = useState([]) const [splashText, setSplashText] = useState('') useEffect(() => { fetch('/splash.json') .then(response => response.json()) .then(data => { const randomIndex = Math.floor(Math.random() * data.length); setSplashText(data[randomIndex].splash); }) .catch(error => console.error('Error fetching splash text:', error)); store.set('shortcuts', [], false) const data: Item[] = store('shortcuts') setShortcuts(data) }, []) return (

Radius

{ if (e.key !== 'Enter') return router.push(`/go/${btoa(e.currentTarget.value)}`) }} />

{splashText}

{shortcuts.length > 0 && (
{shortcuts.map((shortcut: Item) => { return })}
)}
) }