frontAnswerer/lib/components/ViewPublicationPage/ApologyPage.tsx

32 lines
747 B
TypeScript
Raw Normal View History

2024-04-03 13:00:54 +00:00
import { Box, Typography } from "@mui/material";
import { FallbackProps } from "react-error-boundary";
2025-04-20 15:16:22 +00:00
import { useTranslation } from "react-i18next";
2024-04-03 13:00:54 +00:00
type Props = Partial<FallbackProps>;
export const ApologyPage = ({ error }: Props) => {
2025-04-20 15:16:22 +00:00
let message = error.message || error.response?.data;
const { t } = useTranslation();
2024-04-03 13:00:54 +00:00
2024-05-31 16:41:18 +00:00
return (
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "center",
height: "100%",
backgroundColor: "#F2F3F7",
}}
>
<Typography
sx={{
textAlign: "center",
color: "text.primary",
}}
>
2025-04-20 15:16:22 +00:00
{t(message.toLowerCase())}
2024-05-31 16:41:18 +00:00
</Typography>
</Box>
);
2024-04-03 13:00:54 +00:00
};