fix(dashboard): navigation issues

This commit is contained in:
Lakhan Samani
2022-01-17 13:03:28 +05:30
parent f1b4141367
commit a596d91ce0
13 changed files with 320 additions and 270 deletions

View File

@@ -1,14 +1,16 @@
import { Box, Flex } from "@chakra-ui/react";
import React from "react";
import { Sidebar } from "../components/Sidebar";
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>
);
return (
<Flex flexWrap="wrap" h="100%">
<Box w="72" bg="blue.500" flex="1" position="fixed" h="100vh">
<Sidebar />
</Box>
<Box as="main" flex="2" p="10" marginLeft="72">
{children}
</Box>
</Flex>
);
}