import type { FormEvent } from "react"; import { Link, NavLink, Outlet, useNavigate } from "react-router-dom"; import { useAuth } from "../auth"; export function Layout() { const { user, loading, logout } = useAuth(); const navigate = useNavigate(); function onSearch(e: FormEvent) { e.preventDefault(); const q = String(new FormData(e.currentTarget).get("q")).trim(); if (q) navigate(`/search?q=${encodeURIComponent(q)}`); } return (
⊚spool
); }