frontAnswerer/lib/components/ViewPublicationPage/ApologyPage.tsx
Nastya d5622a5a86
All checks were successful
Deploy / CreateImage (push) Successful in 4m53s
Deploy / DeployService (push) Successful in 27s
--
2025-07-01 12:24:54 +03:00

37 lines
924 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) => {
let message = error?.message || error?.response?.data || "default message";
console.log("message");
console.log(message);
console.log(message.toLowerCase());
const { t } = useTranslation();
console.log("t");
console.log(t(message.toLowerCase()));
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>
);
};