Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 71x 5x 5x 1x | import * as UI from "@/components"; import { XCircleIcon } from "lucide-react"; import { ReactQueryApiError } from "shared-types"; export const ErrorAlert = ({ error }: { error: ReactQueryApiError }) => { let message = "An error has occurred"; if (error?.response?.data?.message) { message = error.response.data.message; } return ( // <UI.Alert alertBody={message} alertHeading="Error" variation="error" /> <UI.Alert className="border-2" variant="destructive"> <XCircleIcon className="w-6 h-6" /> <UI.AlertTitle>Error</UI.AlertTitle> <UI.AlertDescription>{message}</UI.AlertDescription> </UI.Alert> ); }; |