import { Button } from "@/ui"; import { useLocation, useNavigate } from "react-router-dom"; // import Button /*const isDev = process.env.REACT_APP_NODE_ENV === "development"; const hostname = `${ isDev ? process.env.REACT_APP_DEV_API_URL : process.env.REACT_APP_PROD_API_URL }`;*/ type ErrorPageProps = { error?: string; }; export const ErrorPage = (props: ErrorPageProps) => { const navigate = useNavigate(); const location = useLocation(); const navMsg = location.state?.error; const msg = navMsg ? (
{navMsg}
) : props.error ? ({props.error}
) : (The targeted page "{location.pathname}" was not found, please confirm the spelling and try again.
); return (