Fork of atp.tools as a universal profile for people on the ATmosphere
1import { CircleAlert, Undo } from "lucide-react";
2import { Button } from "./ui/button";
3import { useRouter } from "@tanstack/react-router";
4import { SmartSearchBar } from "./smartSearchBar";
5
6export default function ShowError({ error }: { error: Error }) {
7 const router = useRouter();
8 return (
9 <div className="flex flex-col max-h-[calc(100vh-5rem)] h-screen justify-center items-center gap-4">
10 <div className="flex flex-col gap-2 items-center">
11 <CircleAlert className="text-red-500" width={48} height={48} />
12 <div className="h-min text-wrap break-words max-w-md w-full text-center">
13 {error.message}
14 </div>
15 </div>
16 <div className="flex flex-row gap-2 items-center">
17 <Button variant="secondary" onClick={() => router.history.back()}>
18 Go back <Undo />
19 </Button>
20 <div>or</div>
21 <div className="w-48">
22 <SmartSearchBar isKeybindEnabled={false} />
23 </div>
24 </div>
25 </div>
26 );
27}