Files
LingvAI/components/CustomError.tsx

37 lines
1018 B
TypeScript
Raw Permalink Normal View History

2021-03-16 23:58:12 +01:00
import { FC } from "react";
2021-03-18 14:18:29 +01:00
import { Stack, HStack, Heading, Text, Icon, useColorModeValue } from "@chakra-ui/react";
2021-03-16 23:58:12 +01:00
import { FaSadTear } from "react-icons/fa";
import { CustomHead } from ".";
2021-03-16 23:58:12 +01:00
type Props = {
statusCode: number,
statusText: string
2021-03-16 23:58:12 +01:00
};
const CustomError: FC<Props> = ({ statusCode, statusText }) => (
<>
<CustomHead customTitle={`${statusCode} - ${statusText}`} />
2021-03-18 14:18:29 +01:00
<Stack
color={useColorModeValue("lingva.900", "lingva.100")}
direction={["column", null, "row"]}
justify="center"
align="center"
spacing={4}
w="full"
>
<HStack align="center" spacing={5}>
<Heading as="h1" size="3xl">
{statusCode}
</Heading>
<Icon as={FaSadTear} boxSize={10} />
</HStack>
<Text as="h2" fontSize="xl">
{statusText}
2021-03-18 14:18:29 +01:00
</Text>
</Stack>
</>
2021-03-16 23:58:12 +01:00
);
export default CustomError;