feat: add router to the arm page (#14)
This commit is contained in:
@@ -2,7 +2,9 @@ import { Box, Button, Heading, VStack } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
import { Divider } from '@chakra-ui/react';
|
||||
import i18next from 'i18next';
|
||||
const Sidebar = ({ onSelectPage }) => (
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Sidebar = () => (
|
||||
<Box
|
||||
borderRight='1px solid black'
|
||||
bg='gray.50'
|
||||
@@ -17,23 +19,17 @@ const Sidebar = ({ onSelectPage }) => (
|
||||
|
||||
<VStack align='start' spacing='4'>
|
||||
<Divider />
|
||||
<Button
|
||||
onClick={() => onSelectPage('orders')}
|
||||
w='100%'
|
||||
colorScheme='green'
|
||||
variant='ghost'
|
||||
>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.orders`)}
|
||||
</Button>
|
||||
<Link to='orders'>
|
||||
<Button w='100%' colorScheme='green' variant='ghost'>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.orders`)}
|
||||
</Button>
|
||||
</Link>
|
||||
<Divider />
|
||||
<Button
|
||||
onClick={() => onSelectPage('masters')}
|
||||
w='100%'
|
||||
colorScheme='green'
|
||||
variant='ghost'
|
||||
>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.master`)}
|
||||
</Button>
|
||||
<Link to='masters'>
|
||||
<Button w='100%' colorScheme='green' variant='ghost'>
|
||||
{i18next.t(`dry-wash.arm.master.sideBar.title.master`)}
|
||||
</Button>
|
||||
</Link>
|
||||
<Divider />
|
||||
</VStack>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user