mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
chore(web): remove unused code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CustomNotificationProps, NotificationProps } from '../../notifications/NotificationWrapper';
|
||||
import { CustomNotificationProps } from '../../notifications/NotificationWrapper';
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugCustomNotification = () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Checkbox } from '@mantine/core';
|
||||
import { useEffect } from 'react';
|
||||
import { ICheckbox } from '../../../../interfaces/dialog';
|
||||
import { UseFormRegisterReturn } from 'react-hook-form';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<ProgressbarProps>('progress', (data) => {
|
||||
setCancelled(false);
|
||||
setVisible(true);
|
||||
setLabel(data.label);
|
||||
setDuration(data.duration);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user