Skip to content

Commit

Permalink
chore(nui): Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed Jan 6, 2022
1 parent 6a94dd6 commit 1948c78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
9 changes: 2 additions & 7 deletions ui/src/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Center, Box, BoxProps } from '@chakra-ui/react';
import { Center, Box } from '@chakra-ui/react';
import { debugData } from '../utils/debugData';
import { motion } from 'framer-motion';
import TopBar from './NavBars/TopBar';
import LeftBar from './NavBars/LeftBar';
import { Routes, Route } from 'react-router-dom';
import Resource from './Resource';
import RightBar from './NavBars/RightBar';
import MainContent from './MainContent';
import { useVisibility } from '../providers/VisibilityProvider';

debugData([
{
Expand All @@ -20,11 +18,7 @@ debugData([
},
]);

const MotionBox = motion<BoxProps>(Box);

const App: React.FC = () => {
const { visible } = useVisibility();

return (
<Center w="100%" h="100%">
<Box
Expand All @@ -42,6 +36,7 @@ const App: React.FC = () => {
<MainContent>
<Routes>
<Route path="/:resource" element={<Resource />} />
<Route path="/" element={<></>} />
</Routes>
</MainContent>
</Box>
Expand Down
1 change: 0 additions & 1 deletion ui/src/components/NavBars/LeftBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box, VStack } from '@chakra-ui/react';
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { useNuiEvent } from '../../hooks/useNuiEvent';
import { debugData } from '../../utils/debugData';
import type { InitData } from '../../types';

const LeftBar: React.FC = () => {
Expand Down
5 changes: 1 addition & 4 deletions ui/src/components/Resource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useParams } from 'react-router-dom';
import { useEffect, useState, useMemo } from 'react';
import { fetchNui } from '../utils/fetchNui';
import { useNuiEvent } from '../hooks/useNuiEvent';
import { debugData } from '../utils/debugData';
import { Table, Thead, Tbody, Tr, Th, Td, chakra, Flex, IconButton, Text } from '@chakra-ui/react';
import {
TriangleDownIcon,
Expand Down Expand Up @@ -139,7 +138,7 @@ const Resource: React.FC = () => {
))}
</Thead>
<Tbody {...getTableBodyProps()}>
{isLoaded ? (
{isLoaded && (
<>
{page.map((row) => {
prepareRow(row);
Expand All @@ -161,8 +160,6 @@ const Resource: React.FC = () => {
);
})}
</>
) : (
<h2>Loading....</h2>
)}
</Tbody>
</Table>
Expand Down

0 comments on commit 1948c78

Please sign in to comment.