mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 06:28:53 +00:00
fix(nui): Show current selected link in white
This commit is contained in:
1 parent
236be18736
commit
3fb80ce6fe
1 file changed
+10
-7
@@ -1,6 +1,6 @@
|
|||||||
import { Box, VStack, Text } from '@chakra-ui/react';
|
import { Box, VStack } from '@chakra-ui/react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
||||||
import type { InitData } from '../../types';
|
import type { InitData } from '../../types';
|
||||||
|
|
||||||
@@ -16,11 +16,14 @@ const LeftBar: React.FC = () => {
|
|||||||
<VStack align="left">
|
<VStack align="left">
|
||||||
{initData.resources.map((resource, index) => (
|
{initData.resources.map((resource, index) => (
|
||||||
<Box isTruncated key={`${resource}-${index}`}>
|
<Box isTruncated key={`${resource}-${index}`}>
|
||||||
<Link to={resource}>
|
<NavLink
|
||||||
<Text _hover={{ color: 'white' }} color="grey">
|
to={resource}
|
||||||
{resource}
|
style={(state) => ({
|
||||||
</Text>
|
color: state.isActive ? 'white' : 'grey',
|
||||||
</Link>
|
})}
|
||||||
|
>
|
||||||
|
<Box _hover={{ color: 'white' }}>{resource}</Box>
|
||||||
|
</NavLink>
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
</VStack>
|
</VStack>
|
||||||
|
|||||||
Reference in new issue
Block a user