diff --git a/app/page.tsx b/app/page.tsx index c092818..b0e8091 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -33,12 +33,14 @@ export default function Page() { const [links, setLinks] = useState([]); const [searchTerm, setSearchTerm] = useState(""); const [accordionExpanded, setAccordionExpanded] = useState(false); - const inputRef = useRef(); + const inputRef = useRef(null); useEffect(() => { const handleKeyDown = (event: any) => { if (event.key === "/") { - inputRef.current.focus(); + if (inputRef.current) { + inputRef.current.focus(); + } event.preventDefault(); } };