NotFound.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { useLocation, Link } from "react-router-dom";
  2. import { useEffect } from "react";
  3. import { SEO } from "@/components/SEO";
  4. const NotFound = () => {
  5. const location = useLocation();
  6. useEffect(() => {
  7. console.error(
  8. "404 Error: User attempted to access non-existent route:",
  9. location.pathname
  10. );
  11. }, [location.pathname]);
  12. return (
  13. <>
  14. <SEO
  15. title="Page non trouvée - 404"
  16. description="La page que vous recherchez n'existe pas."
  17. canonical={`https://feeds.duhaz.fr${location.pathname}`}
  18. />
  19. <div className="min-h-screen flex items-center justify-center bg-background">
  20. <div className="text-center">
  21. <h1 className="text-4xl font-bold mb-4 text-foreground">404</h1>
  22. <p className="text-xl text-muted-foreground mb-4">Page non trouvée</p>
  23. <Link to="/" className="text-primary hover:text-primary/90 underline">
  24. Retour à l'accueil
  25. </Link>
  26. </div>
  27. </div>
  28. </>
  29. );
  30. };
  31. export default NotFound;