diff --git a/website/src/components/EmptyState.tsx b/website/src/components/EmptyState.tsx index aa50bd9f..8d82163c 100644 --- a/website/src/components/EmptyState.tsx +++ b/website/src/components/EmptyState.tsx @@ -1,5 +1,6 @@ -import { Center, Text, useColorMode, useColorModeValue } from "@chakra-ui/react"; -import { FiFileText } from "react-icons/fi"; +import { Box, Link, Text, useColorModeValue } from "@chakra-ui/react"; +import { useRouter } from "next/router"; +import { FiAlertTriangle } from "react-icons/fi"; import { IconType } from "react-icons/lib"; type EmptyStateProps = { @@ -8,25 +9,26 @@ type EmptyStateProps = { }; export const EmptyState = (props: EmptyStateProps) => { - const { colorMode } = useColorMode(); - const mainBgClasses = colorMode === "light" ? "bg-slate-300 text-gray-900" : "bg-slate-900 text-white"; - - const widgetClasses = useColorModeValue("border-gray-700 text-gray-700", "border-gray-300 text-gray-300"); + const backgroundColor = useColorModeValue("white", "gray.800"); + const router = useRouter(); return ( -
-
-
- - - {props.text} - -
-
-
+ + + + {props.text} + router.back()} color="blue.500" textUnderlineOffset="3px"> + Click here to go back + + + ); }; export const TaskEmptyState = () => { - return ; + return ; +}; + +export const PageEmptyState = () => { + return ; }; diff --git a/website/src/components/Loading/LoadingScreen.jsx b/website/src/components/Loading/LoadingScreen.jsx index 3aad717f..645544e6 100644 --- a/website/src/components/Loading/LoadingScreen.jsx +++ b/website/src/components/Loading/LoadingScreen.jsx @@ -1,14 +1,12 @@ import { Box, Center, Progress, Text, useColorModeValue } from "@chakra-ui/react"; export const LoadingScreen = ({ text = "Loading..." } = {}) => { - const mainBgClasses = useColorModeValue("bg-slate-300 text-gray-900", "bg-slate-900 text-white"); - return ( - + {text && ( -
- {text} +
+ {text}
)} diff --git a/website/src/pages/404.tsx b/website/src/pages/404.tsx index aae1db0f..c3d01510 100644 --- a/website/src/pages/404.tsx +++ b/website/src/pages/404.tsx @@ -1,32 +1,47 @@ -import { Button, Link, Stack } from "@chakra-ui/react"; +import { Box, Button, Center, Link, Text, useColorModeValue } from "@chakra-ui/react"; import Head from "next/head"; -import NextLink from "next/link"; +import { useRouter } from "next/router"; import { FiAlertTriangle } from "react-icons/fi"; +import { PageEmptyState } from "src/components/EmptyState"; +import { getTransparentHeaderLayout } from "src/components/Layout"; + +function Error() { + const router = useRouter(); + const backgroundColor = useColorModeValue("white", "gray.800"); -export default function Error() { return ( <> 404 - Open Assistant -
- -

Sorry, the page you are looking for does not exist.

-

If you were trying to contribute data but ended up here, please file a bug

- -
-
+ +
); } + +Error.getLayout = getTransparentHeaderLayout; + +export default Error;