Skip to content

Commit

Permalink
refactor(nui): Improve resource text handling
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Jan 22, 2022
1 parent d74cefb commit e9721ca
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions ui/src/components/NavBars/LeftBar.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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>
Expand Down

0 comments on commit e9721ca

Please sign in to comment.