import { useLocation, useNavigate } from 'react-router-dom'; import { Home } from 'lucide-react'; import { Button, EmptyState, Surface } from '@/components/ds'; import { useAuth } from '@/lib/AuthContext'; /** * The 404 page. * * Signed-in operators get a second line naming the route table, because a * missing route in a console is nearly always a link that was renamed rather * than a page that never existed. */ export default function PageNotFound() { const location = useLocation(); const navigate = useNavigate(); const { isAuthenticated } = useAuth(); const path = location.pathname; return (
navigate(isAuthenticated ? '/doormile/dispatch' : '/login')}> {isAuthenticated ? 'Back to Dispatch' : 'Sign in'} } /> {isAuthenticated && (

If this address used to work, check the route table in src/App.jsx.

)}
); }