import * as React from 'react'; import { Heading, Text, View, Link, Image, Flex, useTheme, } from '@aws-amplify/ui-react'; import { cats } from '@/data/cats'; const Custom404 = () => { const { tokens } = useTheme(); let [href, setHref] = React.useState('https://ui.docs.amplify.aws'); let [cat, setCat] = React.useState(undefined); React.useEffect(() => { setHref(window.location.href); setCat(cats[Math.floor(Math.random() * cats.length)]); }, []); return ( 404 {`Apologies—we can't seem to find this page.`}
{`If this is a mistake, please `} `)}`} > file an issue {` and we will get it fixed ASAP.`}
{cat ? {cat.alt} : null}
); }; export default Custom404;