frontAnswerer/lib/components/ViewPublicationPage/ApologyPage.tsx
Nastya b068fd65cc
Some checks failed
Deploy / CreateImage (push) Successful in 3m54s
Deploy / DeployService (push) Failing after 23s
Merge branch 'newai'
2025-05-01 21:45:06 +03:00

33 lines
770 B
TypeScript

import { Box, Typography } from "@mui/material";
import { FallbackProps } from "react-error-boundary";
import { useTranslation } from "react-i18next";
type Props = Partial<FallbackProps>;
export const ApologyPage = ({ error }: Props) => {
console.log(error);
let message = error.message || error.response?.data;
const { t } = useTranslation();
return (
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "center",
height: "100%",
backgroundColor: "#F2F3F7",
}}
>
<Typography
sx={{
textAlign: "center",
color: "text.primary",
}}
>
{t(message.toLowerCase())}
</Typography>
</Box>
);
};