|
1 | 1 | import { useContext } from "react"; |
2 | 2 | import { parseCookies } from "nookies"; |
3 | | -import { Box, Flex, SimpleGrid, Text } from "@chakra-ui/react"; |
4 | | - |
5 | | -import { Header } from "@/components/Header"; |
6 | | -import { Sidebar } from "@/components/Sidebar"; |
7 | 3 | import { AuthContext } from "@/contexts/AuthContext"; |
| 4 | +import { Dashboard } from "@/features/dashboard"; |
8 | 5 |
|
9 | | -export default function Dashboard() { |
| 6 | +export default function DashboardPage() { |
10 | 7 | const { user } = useContext(AuthContext); |
11 | | - |
12 | | - return ( |
13 | | - <> |
14 | | - <Flex direction="column" h="100vh"> |
15 | | - <Header /> |
16 | | - <Flex w="100%" my="6" maxWidth={1480} mx="auto" px="6"> |
17 | | - <Sidebar /> |
18 | | - <SimpleGrid columns={{ base: 1, md: 2 }} spacing={{ base: 5, lg: 8 }} w="100dvw"> |
19 | | - <Box p={["6", "8"]} bg="gray.800" borderRadius={8} flex="50%"> |
20 | | - <Text fontSize="lg" fontWeight="bold" mb="4"> |
21 | | - Status do cadastro do atleta |
22 | | - </Text> |
23 | | - <Text color="green.400">{user?.name}</Text> |
24 | | - <Text color="green.400">Regular</Text> |
25 | | - </Box> |
26 | | - |
27 | | - <Box p={["6", "8"]} bg="gray.800" borderRadius={8} flex="50%"> |
28 | | - <Text fontSize="lg" fontWeight="bold" mb="4"> |
29 | | - Dados de acesso da semana |
30 | | - </Text> |
31 | | - {user?.name} <br /> |
32 | | - {user?.about} <br /> |
33 | | - </Box> |
34 | | - |
35 | | - <Box p={["6", "8"]} bg="gray.800" borderRadius={8} flex="50%"> |
36 | | - <Text fontSize="lg" fontWeight="bold" mb="4"> |
37 | | - Documentações |
38 | | - </Text> |
39 | | - <Text color="green.400" as="a" href="#" textDecoration={"underline"}> |
40 | | - Instruções para inscrição em eventos |
41 | | - </Text> |
42 | | - </Box> |
43 | | - |
44 | | - <Box p={["6", "8"]} bg="gray.800" borderRadius={8} flex="50%"> |
45 | | - <Text fontSize="lg" fontWeight="bold" mb="4"> |
46 | | - Taxa de abertura |
47 | | - </Text> |
48 | | - </Box> |
49 | | - </SimpleGrid> |
50 | | - </Flex> |
51 | | - </Flex> |
52 | | - </> |
53 | | - ); |
| 8 | + return <Dashboard user={user} />; |
54 | 9 | } |
55 | 10 |
|
56 | 11 | export const getServerSideProps = async (ctx: any) => { |
|
0 commit comments