Merge branch 'main' into lucide

This commit is contained in:
notmd
2023-01-22 20:38:43 +07:00
16 changed files with 456 additions and 201 deletions
+5 -6
View File
@@ -1,6 +1,6 @@
import { Box, Link, Text, useColorModeValue } from "@chakra-ui/react";
import { Box, Text, useColorModeValue } from "@chakra-ui/react";
import { AlertTriangle, LucideIcon } from "lucide-react";
import { useRouter } from "next/router";
import NextLink from "next/link";
type EmptyStateProps = {
text: string;
@@ -9,16 +9,15 @@ type EmptyStateProps = {
export const EmptyState = (props: EmptyStateProps) => {
const backgroundColor = useColorModeValue("white", "gray.800");
const router = useRouter();
return (
<Box bg={backgroundColor} p="10" borderRadius="xl" shadow="base">
<Box display="flex" flexDirection="column" alignItems="center" gap="8" fontSize="lg">
<props.icon size="30" color="DarkOrange" />
<Text>{props.text}</Text>
<Link onClick={() => router.back()} color="blue.500" textUnderlineOffset="3px">
<Text>Click here to go back</Text>
</Link>
<NextLink href="/dashboard">
<Text color="blue.500">Go back to the dashboard</Text>
</NextLink>
</Box>
</Box>
);