diff --git a/web/src/features/dev/debug/notification.ts b/web/src/features/dev/debug/notification.ts index f8fa0ee35..43d77ad97 100644 --- a/web/src/features/dev/debug/notification.ts +++ b/web/src/features/dev/debug/notification.ts @@ -1,4 +1,4 @@ -import { CustomNotificationProps, NotificationProps } from '../../notifications/NotificationWrapper'; +import { CustomNotificationProps } from '../../notifications/NotificationWrapper'; import { debugData } from '../../../utils/debugData'; export const debugCustomNotification = () => { diff --git a/web/src/features/dialog/components/fields/checkbox.tsx b/web/src/features/dialog/components/fields/checkbox.tsx index 9fe0f8f2a..c6496bc8d 100644 --- a/web/src/features/dialog/components/fields/checkbox.tsx +++ b/web/src/features/dialog/components/fields/checkbox.tsx @@ -1,5 +1,4 @@ import { Checkbox } from '@mantine/core'; -import { useEffect } from 'react'; import { ICheckbox } from '../../../../interfaces/dialog'; import { UseFormRegisterReturn } from 'react-hook-form'; diff --git a/web/src/features/dialog/components/fields/input.tsx b/web/src/features/dialog/components/fields/input.tsx index de6f8d121..065de238e 100644 --- a/web/src/features/dialog/components/fields/input.tsx +++ b/web/src/features/dialog/components/fields/input.tsx @@ -1,6 +1,6 @@ import { createStyles, PasswordInput, TextInput } from '@mantine/core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import React, { useEffect } from 'react'; +import React from 'react'; import { IInput } from '../../../../interfaces/dialog'; import { UseFormRegisterReturn } from 'react-hook-form'; diff --git a/web/src/features/dialog/components/fields/number.tsx b/web/src/features/dialog/components/fields/number.tsx index e8a39e7bd..d526dd39a 100644 --- a/web/src/features/dialog/components/fields/number.tsx +++ b/web/src/features/dialog/components/fields/number.tsx @@ -1,8 +1,7 @@ import { NumberInput } from '@mantine/core'; -import { useEffect } from 'react'; import { INumber } from '../../../../interfaces/dialog'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Control, useController, UseFormRegisterReturn } from 'react-hook-form'; +import { Control, useController } from 'react-hook-form'; import { FormValues } from '../../InputDialog'; interface Props { diff --git a/web/src/features/dialog/components/fields/select.tsx b/web/src/features/dialog/components/fields/select.tsx index f4d5316ca..ac2c50ba5 100644 --- a/web/src/features/dialog/components/fields/select.tsx +++ b/web/src/features/dialog/components/fields/select.tsx @@ -1,6 +1,6 @@ import { MultiSelect, Select } from '@mantine/core'; import { ISelect } from '../../../../interfaces/dialog'; -import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form'; +import { Control, useController } from 'react-hook-form'; import { FormValues } from '../../InputDialog'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; diff --git a/web/src/features/dialog/components/fields/slider.tsx b/web/src/features/dialog/components/fields/slider.tsx index 4e42eb2d5..84f16e6ee 100644 --- a/web/src/features/dialog/components/fields/slider.tsx +++ b/web/src/features/dialog/components/fields/slider.tsx @@ -1,7 +1,6 @@ import { Box, Slider, Text } from '@mantine/core'; -import { useEffect, useState } from 'react'; import { ISlider } from '../../../../interfaces/dialog'; -import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form'; +import { Control, useController } from 'react-hook-form'; import { FormValues } from '../../InputDialog'; interface Props { diff --git a/web/src/features/menu/context/ContextMenu.tsx b/web/src/features/menu/context/ContextMenu.tsx index a81f9d544..52356becf 100644 --- a/web/src/features/menu/context/ContextMenu.tsx +++ b/web/src/features/menu/context/ContextMenu.tsx @@ -1,5 +1,5 @@ import { useNuiEvent } from '../../../hooks/useNuiEvent'; -import { Box, Stack, Text, Flex, Transition } from '@mantine/core'; +import { Box, Stack, Text, Flex } from '@mantine/core'; import { useEffect, useState } from 'react'; import { ContextMenuProps } from '../../../interfaces/context'; import ContextButton from './components/ContextButton'; diff --git a/web/src/features/notifications/NotificationWrapper.tsx b/web/src/features/notifications/NotificationWrapper.tsx index 2b36ddeac..fc0a0f69f 100644 --- a/web/src/features/notifications/NotificationWrapper.tsx +++ b/web/src/features/notifications/NotificationWrapper.tsx @@ -6,16 +6,6 @@ import ReactMarkdown from 'react-markdown'; import { Avatar, createStyles, Group, Stack, Box, Text, keyframes } from '@mantine/core'; import React from 'react'; -export interface NotificationProps { - title?: string; - description?: string; - duration?: number; - position?: ToastPosition | 'top' | 'bottom'; - variant?: string; - status?: 'info' | 'warning' | 'success' | 'error'; - id?: number; -} - export interface CustomNotificationProps { style?: React.CSSProperties; description?: string; diff --git a/web/src/features/progress/Progressbar.tsx b/web/src/features/progress/Progressbar.tsx index 935f4758c..d016b4599 100644 --- a/web/src/features/progress/Progressbar.tsx +++ b/web/src/features/progress/Progressbar.tsx @@ -55,7 +55,6 @@ const Progressbar: React.FC = () => { const [visible, setVisible] = React.useState(false); const [label, setLabel] = React.useState(''); const [duration, setDuration] = React.useState(0); - const [cancelled, setCancelled] = React.useState(false); const progressComplete = () => { setVisible(false); @@ -63,14 +62,12 @@ const Progressbar: React.FC = () => { }; const progressCancel = () => { - setCancelled(true); setVisible(false); }; useNuiEvent('progressCancel', progressCancel); useNuiEvent('progress', (data) => { - setCancelled(false); setVisible(true); setLabel(data.label); setDuration(data.duration); diff --git a/web/src/features/skillcheck/index.tsx b/web/src/features/skillcheck/index.tsx index 55a9130aa..0b0984e75 100644 --- a/web/src/features/skillcheck/index.tsx +++ b/web/src/features/skillcheck/index.tsx @@ -2,7 +2,7 @@ import { useRef, useState } from 'react'; import { useNuiEvent } from '../../hooks/useNuiEvent'; import Indicator from './indicator'; import { fetchNui } from '../../utils/fetchNui'; -import { useMantineTheme, Box, createStyles } from '@mantine/core'; +import { Box, createStyles } from '@mantine/core'; interface CustomGameDifficulty { areaSize: number; diff --git a/web/src/features/skillcheck/indicator.tsx b/web/src/features/skillcheck/indicator.tsx index df431557f..1ba737585 100644 --- a/web/src/features/skillcheck/indicator.tsx +++ b/web/src/features/skillcheck/indicator.tsx @@ -1,5 +1,4 @@ import { useCallback, useEffect, useState } from 'react'; -import { useKeyPress } from '../../hooks/useKeyPress'; import { SkillCheckProps } from './index'; import { useInterval } from '@mantine/hooks'; import { circleCircumference } from './index'; diff --git a/web/src/main.tsx b/web/src/main.tsx index cb94423c8..4a4587ded 100644 --- a/web/src/main.tsx +++ b/web/src/main.tsx @@ -2,14 +2,12 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; -import { theme } from './theme'; import { fas } from '@fortawesome/free-solid-svg-icons'; import { far } from '@fortawesome/free-regular-svg-icons'; import { fab } from '@fortawesome/free-brands-svg-icons'; import { library } from '@fortawesome/fontawesome-svg-core'; import { isEnvBrowser } from './utils/misc'; import LocaleProvider from './providers/LocaleProvider'; -import { MantineProvider } from '@mantine/core'; import ConfigProvider from './providers/ConfigProvider'; library.add(fas, far, fab);