import { useTranslation } from "@plexswap/localization"; import { JSXElementConstructor, ReactNode, createElement } from "react"; import { styled } from "styled-components"; import { Button } from "../Button"; import { Heading } from "../Heading"; import { LogoIcon } from "../Svg"; import { Text } from "../Text"; const StyledNotFound = styled.div` align-items: center; display: flex; flex-direction: column; height: calc(100vh - 64px); justify-content: center; `; const NotFound = ({ statusCode = 404, children, LinkComp, }: { LinkComp: JSXElementConstructor; statusCode?: number; children: ReactNode; }) => { const { t } = useTranslation(); const linkElement = createElement( LinkComp, { href: "/", passHref: true, }, ); return ( <> {children} {statusCode} {t("Oops, page not found.")} {linkElement} ); }; export default NotFound;