diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index e5ae97d..87e32b9 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -32,6 +32,7 @@ import FeedbackReviewPage from "./Components/feedback/FeedbackReviewPage"; import 'react-toastify/dist/ReactToastify.css'; import { ToastContainer } from 'react-toastify'; +import NotFound from "./Components/ui/NotFound"; function Home() { const [showTop, setShowTop] = useState(false); @@ -141,6 +142,7 @@ function App() { } /> } /> } /> + }/> { +export default function NotFound() { const navigate = useNavigate(); - - // Check if user is logged in const isAuthenticated = !!localStorage.getItem("token"); const handleRedirect = () => { if (isAuthenticated) { - navigate("/dashboard"); // authenticated users go to dashboard + navigate("/dashboard"); } else { - navigate("/"); // unauthenticated users go to landing page + navigate("/"); } }; return ( - - 404 - - Oops! The page you’re looking for doesn’t exist. + + + • DevSync Error • + + + + 404 + + + + Oops! Page Not Found + + + + It looks like the page you're trying to reach doesn't exist or has been moved. + Don't worry, we'll help you get back on track. - - Go Back Home + + + {isAuthenticated ? "Back to Dashboard" : "Back to Home"} - + ); -}; - -export default NotFound; +}
- Oops! The page you’re looking for doesn’t exist. +
+ • DevSync Error • +
+ It looks like the page you're trying to reach doesn't exist or has been moved. + Don't worry, we'll help you get back on track.