Compare commits
No commits in common. "7025c1a31bfb69d82a1e6b3d43c228078c276fbe" and "a9738c7d8a5bea148b80aed6952a1a6879cbb167" have entirely different histories.
7025c1a31b
...
a9738c7d8a
@ -14,8 +14,8 @@ module.exports = {
|
|||||||
'dry-wash.main': '/dry-wash',
|
'dry-wash.main': '/dry-wash',
|
||||||
'dry-wash.create': '/order',
|
'dry-wash.create': '/order',
|
||||||
'dry-wash.view.order': '/order/:orderId',
|
'dry-wash.view.order': '/order/:orderId',
|
||||||
'dry-wash.arm.master': 'master',
|
'dry-wash.arm.master': '/master',
|
||||||
'dry-wash.arm.order': 'order',
|
'dry-wash.arm.order': '/order',
|
||||||
'dry-wash.arm': '/arm/*',
|
'dry-wash.arm': '/arm/*',
|
||||||
},
|
},
|
||||||
features: {
|
features: {
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
import { Box, Button, Heading, VStack, Divider } from '@chakra-ui/react';
|
import { Box, Button, Heading, VStack, Divider } from '@chakra-ui/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useLocation, Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { URLs } from '../../__data__/urls';
|
import { URLs } from '../../__data__/urls';
|
||||||
|
|
||||||
const Sidebar = () => {
|
const Sidebar = () => {
|
||||||
const location = useLocation();
|
|
||||||
const isActive = (keyword: string) => location.pathname.includes(keyword);
|
|
||||||
|
|
||||||
const { t } = useTranslation('~', {
|
const { t } = useTranslation('~', {
|
||||||
keyPrefix: 'dry-wash.arm.master.sideBar',
|
keyPrefix: 'dry-wash.arm.master.sideBar',
|
||||||
});
|
});
|
||||||
@ -33,8 +30,8 @@ const Sidebar = () => {
|
|||||||
as={Link}
|
as={Link}
|
||||||
to={URLs.armOrder.url}
|
to={URLs.armOrder.url}
|
||||||
w='100%'
|
w='100%'
|
||||||
colorScheme={isActive(URLs.armOrder.url) ? 'green' : 'blue'}
|
colorScheme='green'
|
||||||
variant={isActive(URLs.armOrder.url) ? 'solid' : 'ghost'}
|
variant='ghost'
|
||||||
>
|
>
|
||||||
{t('orders')}
|
{t('orders')}
|
||||||
</Button>
|
</Button>
|
||||||
@ -45,8 +42,8 @@ const Sidebar = () => {
|
|||||||
as={Link}
|
as={Link}
|
||||||
to={URLs.armMaster.url}
|
to={URLs.armMaster.url}
|
||||||
w='100%'
|
w='100%'
|
||||||
colorScheme={isActive(URLs.armMaster.url) ? 'green' : 'blue'}
|
colorScheme='green'
|
||||||
variant={isActive(URLs.armMaster.url) ? 'solid' : 'ghost'}
|
variant='ghost'
|
||||||
>
|
>
|
||||||
{t('master')}
|
{t('master')}
|
||||||
</Button>
|
</Button>
|
||||||
|
Loading…
Reference in New Issue
Block a user