Files
pingator/src/components/LoadingError.tsx
2024-01-24 21:58:39 +01:00

18 lines
461 B
TypeScript

import React from "react";
import { DashboardLoadError } from "../types";
import Alert from "@mui/material/Alert";
import AlertTitle from "@mui/material/AlertTitle";
interface LoadingErrorProps {
error: DashboardLoadError;
}
export default function LoadingError({ error }: LoadingErrorProps) {
return (
<Alert severity="error">
<AlertTitle>{error.message}</AlertTitle>
<p>URL: {error.url}</p>
</Alert>
);
}