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>
    );
}
