frontAnswerer/lib/components/ViewPublicationPage/ApologyPage.tsx
nflnkr 06515a64f9 QuizAnswerer component does not fetch data, but receives it as props
WidgetApp and App components fetch quiz data
2024-02-14 14:03:35 +03:00

29 lines
846 B
TypeScript

import { Box, Typography } from "@mui/material";
import { FallbackProps } from "react-error-boundary";
type Props = Partial<FallbackProps>;
export const ApologyPage = ({ error }: Props) => {
let message = "Что-то пошло не так";
if (error.message === "No questions found") message = "Нет созданных вопросов";
if (error.message === "Quiz already completed") message = "Вы уже прошли этот опрос";
return (
<Box
sx={{
display: "flex",
alignItems: "center",
justifyContent: "center",
height: "100%",
}}
>
<Typography
sx={{
textAlign: "center",
}}
>{message}</Typography>
</Box>
);
};