frontAnswerer/lib/components/ViewPublicationPage/ApologyPage.tsx

36 lines
883 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-07-01 13:49:30 +00:00
let message = error.message || error.response?.data || " ";
2025-05-20 10:56:34 +00:00
console.log("message");
console.log(message.toLowerCase());
2025-04-20 15:16:22 +00:00
const { t } = useTranslation();
2025-05-20 10:56:34 +00:00
console.log("t");
console.log(t(message.toLowerCase()));
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
};