feat: setup dashboard
- Setup basic code structure - Add routes - Add layout components for authentication and dashboard pages - Add session handling - Add login, signup and session
This commit is contained in:
29
dashboard/src/layouts/AuthLayout.tsx
Normal file
29
dashboard/src/layouts/AuthLayout.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Box, Center, Flex, Image, Text } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
import { LOGO_URL } from "../constants";
|
||||
|
||||
export function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<Flex flexWrap="wrap" h="100%">
|
||||
<Center h="100%" flex="3" bg="blue.500" flexDirection="column">
|
||||
<Image
|
||||
src={LOGO_URL}
|
||||
alt=""
|
||||
/>
|
||||
|
||||
<Text
|
||||
color="white"
|
||||
casing="uppercase"
|
||||
fontSize="3xl"
|
||||
mt="2"
|
||||
letterSpacing="2.25px"
|
||||
>
|
||||
Authorizer
|
||||
</Text>
|
||||
</Center>
|
||||
<Center h="100%" flex="2">
|
||||
{children}
|
||||
</Center>
|
||||
</Flex>
|
||||
);
|
||||
}
|
14
dashboard/src/layouts/DashboardLayout.tsx
Normal file
14
dashboard/src/layouts/DashboardLayout.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Box, Flex } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
import { Sidebar } from "../components/Sidebar";
|
||||
|
||||
export function DashboardLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<Flex flexWrap="wrap" h="100%">
|
||||
<Box maxW="72" bg="blue.500" flex="1">
|
||||
<Sidebar />
|
||||
</Box>
|
||||
<Box as="main" flex="2" p="10">{children}</Box>
|
||||
</Flex>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user