mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
refactor(nui): Improve resource text handling
This commit is contained in:
1 parent
d74cefbc7d
commit
e9721ca5ca
1 file changed
+8
-12
@@ -1,4 +1,4 @@
|
||||
import { Box, VStack } from '@chakra-ui/react';
|
||||
import { Box, VStack, Text } from '@chakra-ui/react';
|
||||
import { useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
||||
@@ -15,17 +15,13 @@ const LeftBar: React.FC = () => {
|
||||
<Box p="1.2vh" fontSize="1.5vh" float="left" w="13%" height="90%" overflowY="scroll">
|
||||
<VStack align="left">
|
||||
{initData.resources.map((resource, index) => (
|
||||
<Link to={resource} key={`${resource}-${index}`}>
|
||||
<Box
|
||||
_hover={{ transform: 'scale(1.1)', color: 'white' }}
|
||||
color="grey"
|
||||
textOverflow="ellipsis"
|
||||
overflow="hidden"
|
||||
whiteSpace="nowrap"
|
||||
>
|
||||
{resource}
|
||||
</Box>
|
||||
</Link>
|
||||
<Box isTruncated key={`${resource}-${index}`}>
|
||||
<Link to={resource}>
|
||||
<Text _hover={{ color: 'white' }} color="grey">
|
||||
{resource}
|
||||
</Text>
|
||||
</Link>
|
||||
</Box>
|
||||
))}
|
||||
</VStack>
|
||||
</Box>
|
||||
|
||||
Reference in new issue
Block a user