g1t/apps/web/app/routes/not-found.tsx
| 1 | import { data } from "react-router"; |
| 2 | |
| 3 | /** |
| 4 | * Any address no other route matches. Throwing the 404 from a route, rather |
| 5 | * than leaving the router to, means the root loader still runs, so someone |
| 6 | * signed in sees the page in their own sidebar and not the public frame. |
| 7 | */ |
| 8 | export function loader() { |
| 9 | throw data(null, { status: 404 }); |
| 10 | } |
| 11 | |
| 12 | export default function NotFound() { |
| 13 | return null; |
| 14 | } |