CoolFace
Apppublic

dilums/object-detection

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
Error.tsx27 linesDownload Raw Back to Error
1"use client";2import { ExclamationTriangleIcon } from "@radix-ui/react-icons";3import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";4import useStore from "@/store";5type CompProps = {};6export default function Error({}: CompProps) {7  const error = useStore((state) => state.error);8  const retry = useStore((state) => state.retry);9 10  if (!error) {11    return null;12  }13  return (14    <Alert variant="destructive">15      <ExclamationTriangleIcon className="h-4 w-4" />16      <AlertTitle>Error</AlertTitle>17      <AlertDescription>18        Unknown Error Occurred: This could be due to the model still loading.19        <button className="underline" onClick={retry}>20          Please retry21        </button>{" "}22        after a few minutes.23      </AlertDescription>24    </Alert>25  );26}27