All files / src/components/common/EmptyState NotFoundPageState.tsx

75% Statements 3/4
33.33% Branches 1/3
50% Functions 1/2
75% Lines 3/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43            12x 1x 1x                                                                    
import React from "react";
import EmptyState from "./EmptyState";
import { useNavigate } from "react-router-dom";
import { Text } from "@common/Text";
import { palette } from "@palette";
 
const NotFoundPageState = ({ showGoHome = true }) => {
  const navigate = useNavigate();
  return (
    <EmptyState
      Icon={
        <Text
          fontSize="156px"
          fontWeight="light"
          lineHeight="140.4px"
          letterSpacing="-4.68px"
          gradient={palette.gradient[10]}
        >
          404
        </Text>
      }
      title={{
        main: "This page doesn’t exist",
        secondary:
          "Sorry, the page you are looking for doesn’t exist or has been removed",
      }}
      action={
        showGoHome
          ? {
              label: "Go to homepage",
              onClick: () => navigate("/login"),
            }
          : undefined
      }
      sx={{
        height: "100vh",
      }}
    />
  );
};
 
export default React.memo(NotFoundPageState);