import Link from '@docusaurus/Link'; import { useLocation } from '@docusaurus/router'; import type { Props } from '@theme/NotFound/Content'; import clsx from 'clsx'; import { useEffect, useRef, useState } from 'react'; import { EASE_UI, prefersReducedMotion } from '../../../components/home/hooks'; import ui from '../../../components/home/ui.module.css'; import { OPEN_SEARCH } from '../../../data/site'; import styles from './styles.module.css'; // The missing address types itself into a small editor, then a hand-drawn diagnostic appears under it. export default function NotFoundContent({ className }: Props) { const { pathname } = useLocation(); const root = useRef(null); const [typed, setTyped] = useState(0); const [done, setDone] = useState(false); useEffect(() => { if (prefersReducedMotion()) { setTyped(pathname.length); setDone(true); return; } const entrance = Array.from(root.current?.querySelectorAll('[data-in]') ?? []).map( (el, i) => el.animate( [ { opacity: 0, transform: 'translateY(16px)' }, { opacity: 1, transform: 'translateY(0)' }, ], { duration: 800, delay: 80 + i * 90, easing: EASE_UI, fill: 'backwards' }, ), ); let n = 0; let timer: ReturnType; const step = () => { if (n < pathname.length) { n++; setTyped(n); timer = setTimeout(step, 55 + Math.random() * 60); } else { timer = setTimeout(() => setDone(true), 380); } }; timer = setTimeout(step, 900); return () => { clearTimeout(timer); for (const a of entrance) a.cancel(); }; }, [pathname]); return (
{'//'} 404

Page not found.

There is no page at this address. Start from the installation or search the site.

router.ts 1 problem
{/* biome-ignore lint/a11y/noNoninteractiveTabindex: a scrollable region must be reachable by keyboard (axe scrollable-region-focusable) */}
1 import {'{ site }'}{' '} from{' '} 'react-native-codepad/docs' {';'}
2
3 await site.open( " {pathname.slice(0, typed)} {!done && } ");
errorThere is no page at this address. Diagnostics are on the roadmap. This one is drawn by hand.
Start from the installation → Home
); }