From 1f4797055877a03e8a11bd19808c5e6168ccd581 Mon Sep 17 00:00:00 2001 From: rsandb Date: Mon, 16 Jan 2023 20:22:04 -0600 Subject: [PATCH 1/3] style 500 page --- website/src/components/EmptyState.tsx | 8 +++++++- website/src/pages/500.tsx | 25 ++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/website/src/components/EmptyState.tsx b/website/src/components/EmptyState.tsx index 8d82163c..825dc610 100644 --- a/website/src/components/EmptyState.tsx +++ b/website/src/components/EmptyState.tsx @@ -13,7 +13,7 @@ export const EmptyState = (props: EmptyStateProps) => { const router = useRouter(); return ( - + {props.text} @@ -32,3 +32,9 @@ export const TaskEmptyState = () => { export const PageEmptyState = () => { return ; }; + +export const ServerEmptyState = () => { + return ( + + ); +}; diff --git a/website/src/pages/500.tsx b/website/src/pages/500.tsx index d6e68074..ebbcee67 100644 --- a/website/src/pages/500.tsx +++ b/website/src/pages/500.tsx @@ -1,7 +1,8 @@ -import { Button, Link, Stack } from "@chakra-ui/react"; +import { Button, Box, Text, Center, Link, Stack } from "@chakra-ui/react"; import Head from "next/head"; import NextLink from "next/link"; import { FiAlertTriangle } from "react-icons/fi"; +import { ServerEmptyState } from "src/components/EmptyState"; export default function Error() { return ( @@ -10,23 +11,29 @@ export default function Error() { 500 - Open Assistant -
- -

Sorry, We encountered a server error. We're not sure what went wrong

-

Please file a but below and describe what you were trying to accomplish

- -
-
+
+ ); } From 0c1bb8df05bc3e6c47da861c897f5af0de8cc998 Mon Sep 17 00:00:00 2001 From: rsandb Date: Tue, 17 Jan 2023 21:14:10 -0600 Subject: [PATCH 2/3] update emptystate to be used in specific pages --- website/src/components/EmptyState.tsx | 15 --------------- website/src/pages/404.tsx | 7 +++---- website/src/pages/500.tsx | 17 ++++++++++++----- website/src/pages/tasks/random.tsx | 5 +++-- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/website/src/components/EmptyState.tsx b/website/src/components/EmptyState.tsx index 825dc610..f6245204 100644 --- a/website/src/components/EmptyState.tsx +++ b/website/src/components/EmptyState.tsx @@ -1,6 +1,5 @@ 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 = { @@ -24,17 +23,3 @@ export const EmptyState = (props: EmptyStateProps) => {
); }; - -export const TaskEmptyState = () => { - return ; -}; - -export const PageEmptyState = () => { - return ; -}; - -export const ServerEmptyState = () => { - return ( - - ); -}; diff --git a/website/src/pages/404.tsx b/website/src/pages/404.tsx index f4c09bbf..afe1d080 100644 --- a/website/src/pages/404.tsx +++ b/website/src/pages/404.tsx @@ -1,8 +1,7 @@ -import { Box, Button, Center, Link, Text, useColorModeValue } from "@chakra-ui/react"; +import { Box, Button, Center, Link, Text } from "@chakra-ui/react"; import Head from "next/head"; -import { useRouter } from "next/router"; import { FiAlertTriangle } from "react-icons/fi"; -import { PageEmptyState } from "src/components/EmptyState"; +import { EmptyState } from "src/components/EmptyState"; import { getTransparentHeaderLayout } from "src/components/Layout"; function Error() { @@ -13,7 +12,7 @@ function Error() {
- + If you were trying to contribute data but ended up here, please file a bug.