Page not found
{url && (
Sorry, the page {url} could not be found.
import React from "react"; import { useLocation } from "react-router-dom"; import { MainContentContainer } from "../ui/atoms/page-content"; import "./index.scss"; const FallbackLink = React.lazy(() => import("./fallback-link")); // NOTE! To hack on this component, you have to use a trick to even get to this // unless you use the Express server on localhost:5042. // To get here, use http://localhost:3000/en-US/404/Whatever/you/like // Now hot-reloading works and you can iterate faster. // Otherwise, you can use http://localhost:5042/en-US/docs/Whatever/you/like // (note the :5042 port) and that'll test it a bit more realistically. export function PageNotFound() { const location = useLocation(); const [url, setURL] = React.useState(""); React.useEffect(() => { // If we're in a useEffect, this means we're in a client-side rendering // and in that case the current window.location is realistic. // When it's server-side rendered, the URL is "fake" just to generate // the "empty template" page. setURL(location.pathname); }, [location]); return (
Sorry, the page {url} could not be found.