import { useLocation } from 'react-router-dom'; import { base44 } from '@/api/base44Client'; import { useQuery } from '@tanstack/react-query'; export default function PageNotFound({}) { const location = useLocation(); const pageName = location.pathname.substring(1); const { data: authData, isFetched } = useQuery({ queryKey: ['user'], queryFn: async () => { try { const user = await base44.auth.me(); return { user, isAuthenticated: true }; } catch (error) { return { user: null, isAuthenticated: false }; } } }); return (
{/* 404 Error Code */}

404

{/* Main Message */}

Page Not Found

The page "{pageName}" could not be found in this application.

{/* Admin Note */} {isFetched && authData.isAuthenticated && authData.user?.role === 'admin' && (

Admin Note

This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat.

)} {/* Action Button */}
) }