ErrorPage.tsx 570 B

12345678910111213141516171819202122232425262728
  1. import React from 'react';
  2. import { Button } from 'components/common/Button/Button';
  3. import * as S from './ErrorPage.styled';
  4. interface Props {
  5. status?: number;
  6. text?: string;
  7. btnText?: string;
  8. }
  9. const ErrorPage: React.FC<Props> = ({
  10. status = 404,
  11. text = 'Page is not found',
  12. btnText = 'Go Back to Dashboard',
  13. }) => {
  14. return (
  15. <S.Wrapper>
  16. <S.Status>{status}</S.Status>
  17. <S.Text>{text}</S.Text>
  18. <Button buttonType="primary" buttonSize="M" to="/">
  19. {btnText}
  20. </Button>
  21. </S.Wrapper>
  22. );
  23. };
  24. export default ErrorPage;