From bc1fdbe89f99694a4c28461a80b06d10ba564b9f Mon Sep 17 00:00:00 2001 From: rsandb Date: Tue, 17 Jan 2023 21:18:46 -0600 Subject: [PATCH] add task empty state back as it's being used by multiple pages --- website/src/components/EmptyState.tsx | 7 ++++++- website/src/pages/tasks/random.tsx | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/src/components/EmptyState.tsx b/website/src/components/EmptyState.tsx index f6245204..14715518 100644 --- a/website/src/components/EmptyState.tsx +++ b/website/src/components/EmptyState.tsx @@ -1,5 +1,6 @@ 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 = { @@ -12,7 +13,7 @@ export const EmptyState = (props: EmptyStateProps) => { const router = useRouter(); return ( - + {props.text} @@ -23,3 +24,7 @@ export const EmptyState = (props: EmptyStateProps) => { ); }; + +export const TaskEmptyState = () => { + return ; +}; diff --git a/website/src/pages/tasks/random.tsx b/website/src/pages/tasks/random.tsx index 55310cfc..d2e850f5 100644 --- a/website/src/pages/tasks/random.tsx +++ b/website/src/pages/tasks/random.tsx @@ -1,6 +1,5 @@ import Head from "next/head"; -import { FiAlertTriangle } from "react-icons/fi"; -import { EmptyState } from "src/components/EmptyState"; +import { TaskEmptyState } from "src/components/EmptyState"; import { getDashboardLayout } from "src/components/Layout"; import { LoadingScreen } from "src/components/Loading/LoadingScreen"; import { Task } from "src/components/Tasks/Task"; @@ -14,7 +13,7 @@ const RandomTask = () => { } if (tasks.length === 0) { - return ; + return ; } return (