import { useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { Box, Typography, Button, Container, useTheme } from "@mui/material"; import { useAuth } from "../../contexts/AuthContext"; import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; import { logger } from '../../debugConfig'; function NotFound() { const theme = useTheme(); const navigate = useNavigate(); const { user } = useAuth(); useEffect(() => { logger.debug('not-found', '🔄 Not Found page rendered', { hasUser: !!user, userId: user?.id }); }, [user]); const handleReturn = () => { const returnPath = user ? '/single-player' : '/'; logger.debug('not-found', '🔄 Navigating to return path', { returnPath }); navigate(returnPath); }; return ( 404 Page Not Found The page you're looking for doesn't exist or has been moved. ); } export default NotFound;