repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | import "@/styles/notfound.scss"; |
| #2 | import Link from "next/link"; |
| #3 | import { Button } from "@/components/ui/button"; |
| #4 | |
| #5 | interface NotFoundProps { |
| #6 | statusCode?: number; |
| #7 | message?: string; |
| #8 | title?: string; |
| #9 | } |
| #10 | |
| #11 | const getStatusCode = (message: string) => { |
| #12 | const possibleStatusCodes = ["404", "403", "500", "422"]; |
| #13 | const potentialStatusCode = possibleStatusCodes.find((code) => |
| #14 | message.includes(code) |
| #15 | ); |
| #16 | return potentialStatusCode ? parseInt(potentialStatusCode) : undefined; |
| #17 | }; |
| #18 | |
| #19 | export default function NotFound({ |
| #20 | statusCode, |
| #21 | message = "Page Not Found", |
| #22 | title, |
| #23 | }: NotFoundProps) { |
| #24 | const potentialStatusCode = getStatusCode(message); |
| #25 | |
| #26 | return ( |
| #27 | <div className="flex flex-col items-center justify-center h-[calc(100vh-100px)]"> |
| #28 | <div className="site"> |
| #29 | <div className="sketch"> |
| #30 | <div className="bee-sketch red"></div> |
| #31 | <div className="bee-sketch blue"></div> |
| #32 | </div> |
| #33 | <h1> |
| #34 | {statusCode |
| #35 | ? `${statusCode}:` |
| #36 | : potentialStatusCode |
| #37 | ? `${potentialStatusCode}:` |
| #38 | : "404"} |
| #39 | <small>{title || message || "Page Not Found"}</small> |
| #40 | </h1> |
| #41 | </div> |
| #42 | |
| #43 | <div className=""> |
| #44 | <Button |
| #45 | variant="outline" |
| #46 | className="bg-primary text-white hover:bg-primary/80" |
| #47 | > |
| #48 | <Link href="/">Go Home</Link> |
| #49 | </Button> |
| #50 | </div> |
| #51 | </div> |
| #52 | ); |
| #53 | } |
| #54 |