From 98cd7feaad02937b6c8bbf7d8af232f46ac366ad Mon Sep 17 00:00:00 2001 From: Leigh MacDonald Date: Sat, 21 Oct 2023 05:56:56 -0600 Subject: [PATCH] Update sorting priority --- frontend/.prettierrc | 6 +++--- frontend/src/App.tsx | 4 ++-- frontend/src/component/BanASNModal.tsx | 2 +- frontend/src/component/BanCIDRModal.tsx | 2 +- frontend/src/component/BanGroupModal.tsx | 2 +- frontend/src/component/BanSteamModal.tsx | 2 +- frontend/src/component/ConfirmDeleteFilterModal.tsx | 2 +- frontend/src/component/ConfirmationModal.tsx | 2 +- frontend/src/component/ContainerWithHeader.tsx | 2 +- frontend/src/component/DataTable.tsx | 2 +- frontend/src/component/DataTableRelativeDateField.tsx | 2 +- frontend/src/component/DelayedTextInput.tsx | 2 +- frontend/src/component/DeleteServerModal.tsx | 2 +- frontend/src/component/ErrorBoundary.tsx | 2 +- frontend/src/component/FileUploadModal.tsx | 2 +- frontend/src/component/Flag.tsx | 2 +- frontend/src/component/Flashes.tsx | 2 +- frontend/src/component/Footer.tsx | 2 +- frontend/src/component/FriendList.tsx | 4 ++-- frontend/src/component/Heading.tsx | 2 +- frontend/src/component/HealersOverallContainer.tsx | 2 +- frontend/src/component/IPInput.tsx | 4 ++-- frontend/src/component/InfoBar.tsx | 2 +- frontend/src/component/LazyTable.tsx | 2 +- frontend/src/component/LazyTableSimple.tsx | 2 +- frontend/src/component/LinearProgresWithLabel.tsx | 2 +- frontend/src/component/LoadingPlaceholder.tsx | 2 +- frontend/src/component/LoadingSpinner.tsx | 2 +- frontend/src/component/MDEditor.tsx | 2 +- frontend/src/component/MapUsageContainer.tsx | 2 +- frontend/src/component/MessageContextModal.tsx | 2 +- frontend/src/component/NewsList.tsx | 2 +- frontend/src/component/NewsView.tsx | 4 ++-- frontend/src/component/PersonCell.tsx | 4 ++-- frontend/src/component/PersonMessageTable.tsx | 2 +- frontend/src/component/PlayerClassStatsContainer.tsx | 2 +- frontend/src/component/PlayerMessageContext.tsx | 2 +- frontend/src/component/PlayerStatsOverallContainer.tsx | 2 +- frontend/src/component/PlayersOverallContainer.tsx | 2 +- frontend/src/component/ProfileButton.tsx | 4 ++-- frontend/src/component/ProfileInfoBox.tsx | 2 +- frontend/src/component/ProfilePanel.tsx | 2 +- frontend/src/component/ProfileSelectionInput.tsx | 4 ++-- frontend/src/component/RenderedMarkdownBox.tsx | 2 +- frontend/src/component/ReportComponent.tsx | 2 +- frontend/src/component/ReportForm.tsx | 4 ++-- frontend/src/component/ReportStatusIcon.tsx | 2 +- frontend/src/component/STVListVIew.tsx | 6 +++--- frontend/src/component/ServerEditorModal.tsx | 2 +- frontend/src/component/ServerFilters.tsx | 2 +- frontend/src/component/ServerList.tsx | 2 +- frontend/src/component/ServerMap.tsx | 4 ++-- frontend/src/component/ServerSelect.tsx | 2 +- frontend/src/component/SourceBansList.tsx | 2 +- frontend/src/component/SplitHeading.tsx | 2 +- frontend/src/component/StatsPanel.tsx | 2 +- frontend/src/component/SteamIDList.tsx | 2 +- frontend/src/component/TabPanel.tsx | 2 +- frontend/src/component/TopBar.tsx | 4 ++-- frontend/src/component/UnbanASNModal.tsx | 2 +- frontend/src/component/UnbanCIDRModal.tsx | 2 +- frontend/src/component/UnbanGroupModal.tsx | 2 +- frontend/src/component/UnbanSteamModal.tsx | 2 +- frontend/src/component/UserMessageView.tsx | 2 +- frontend/src/component/WeaponsStatListContainer.tsx | 4 ++-- frontend/src/component/formik/ASNumberField.tsx | 2 +- frontend/src/component/formik/BanReasonField.tsx | 2 +- frontend/src/component/formik/BanReasonTextField.tsx | 2 +- frontend/src/component/formik/BanTypeField.tsx | 2 +- frontend/src/component/formik/DescriptionField.tsx | 2 +- frontend/src/component/formik/DiscordRequiredField.tsx | 2 +- frontend/src/component/formik/DurationCustomField.tsx | 2 +- frontend/src/component/formik/DurationField.tsx | 2 +- frontend/src/component/formik/GameConfigField.tsx | 2 +- frontend/src/component/formik/GameTypeField.tsx | 2 +- frontend/src/component/formik/GroupIdField.tsx | 2 +- frontend/src/component/formik/MapSelectionField.tsx | 2 +- frontend/src/component/formik/ModalButtons.tsx | 2 +- frontend/src/component/formik/NetworkRangeField.tsx | 2 +- frontend/src/component/formik/NoteField.tsx | 2 +- frontend/src/component/formik/ReportIdField.tsx | 2 +- frontend/src/component/formik/ServerSelectionField.tsx | 2 +- frontend/src/component/formik/SteamIdField.tsx | 2 +- frontend/src/component/modal/Buttons.tsx | 2 +- frontend/src/component/modal/Confirm.tsx | 2 +- frontend/src/component/modal/ContestEditor.tsx | 2 +- frontend/src/component/modal/ContestEntryModal.tsx | 2 +- frontend/src/contexts/ColourModeContext.tsx | 2 +- frontend/src/contexts/MapStateCtx.tsx | 2 +- frontend/src/contexts/NotificationsCtx.tsx | 2 +- frontend/src/contexts/UserFlashCtx.tsx | 2 +- frontend/src/index.tsx | 2 +- frontend/src/page/AdminAppeals.tsx | 4 ++-- frontend/src/page/AdminBan.tsx | 4 ++-- frontend/src/page/AdminContests.tsx | 2 +- frontend/src/page/AdminFilters.tsx | 2 +- frontend/src/page/AdminImport.tsx | 2 +- frontend/src/page/AdminNetworkPage.tsx | 2 +- frontend/src/page/AdminNews.tsx | 2 +- frontend/src/page/AdminPeople.tsx | 2 +- frontend/src/page/AdminReports.tsx | 4 ++-- frontend/src/page/AdminServers.tsx | 2 +- frontend/src/page/BanPage.tsx | 4 ++-- frontend/src/page/ChatLogPage.tsx | 6 +++--- frontend/src/page/ContestListPage.tsx | 4 ++-- frontend/src/page/ContestPage.tsx | 4 ++-- frontend/src/page/Home.tsx | 4 ++-- frontend/src/page/Login.tsx | 2 +- frontend/src/page/LoginDiscordSuccess.tsx | 2 +- frontend/src/page/LoginSteamSuccess.tsx | 2 +- frontend/src/page/MatchListPage.tsx | 4 ++-- frontend/src/page/MatchPage.tsx | 4 ++-- frontend/src/page/NotificationsPage.tsx | 2 +- frontend/src/page/PageNotFound.tsx | 2 +- frontend/src/page/PatreonPage.tsx | 2 +- frontend/src/page/PlayerStatsPage.tsx | 2 +- frontend/src/page/Profile.tsx | 4 ++-- frontend/src/page/ProfileSettingsPage.tsx | 2 +- frontend/src/page/ReportCreatePage.tsx | 4 ++-- frontend/src/page/ReportViewPage.tsx | 4 ++-- frontend/src/page/STVPage.tsx | 2 +- frontend/src/page/Servers.tsx | 4 ++-- frontend/src/page/StatsPage.tsx | 2 +- frontend/src/page/StatsWeaponOverallPage.tsx | 4 ++-- frontend/src/page/WikiPage.tsx | 4 ++-- 125 files changed, 157 insertions(+), 157 deletions(-) diff --git a/frontend/.prettierrc b/frontend/.prettierrc index 58047ed5..6a47de56 100644 --- a/frontend/.prettierrc +++ b/frontend/.prettierrc @@ -7,9 +7,9 @@ "@trivago/prettier-plugin-sort-imports" ], "importOrder": [ - "^@core/(.*)$", - "^@server/(.*)$", - "^@ui/(.*)$", + "^react$", + "^react-.*$", + "", "^[./]" ], "importOrderSeparation": false diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e23db6e9..c121938e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,3 +1,5 @@ +import React, { useCallback, useMemo, useState, JSX } from 'react'; +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import NiceModal from '@ebay/nice-modal-react'; import { PaletteMode } from '@mui/material'; import { AlertColor } from '@mui/material/Alert'; @@ -7,8 +9,6 @@ import { ThemeProvider } from '@mui/material/styles'; import useMediaQuery from '@mui/material/useMediaQuery'; import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'; import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; -import React, { useCallback, useMemo, useState, JSX } from 'react'; -import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; import { PermissionLevel, readRefreshToken, diff --git a/frontend/src/component/BanASNModal.tsx b/frontend/src/component/BanASNModal.tsx index 9a0c10d7..8b91a1b0 100644 --- a/frontend/src/component/BanASNModal.tsx +++ b/frontend/src/component/BanASNModal.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import GavelIcon from '@mui/icons-material/Gavel'; import { Dialog, DialogContent, DialogTitle } from '@mui/material'; import Stack from '@mui/material/Stack'; import { useFormik } from 'formik'; -import React from 'react'; import * as yup from 'yup'; import { apiCreateBanASN, BanReason, BanType, Duration } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/BanCIDRModal.tsx b/frontend/src/component/BanCIDRModal.tsx index 588c10c7..97cf730c 100644 --- a/frontend/src/component/BanCIDRModal.tsx +++ b/frontend/src/component/BanCIDRModal.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import GavelIcon from '@mui/icons-material/Gavel'; import { Dialog, DialogContent, DialogTitle } from '@mui/material'; import Stack from '@mui/material/Stack'; import { useFormik } from 'formik'; -import React from 'react'; import * as yup from 'yup'; import { apiCreateBanCIDR, BanReason, BanType, Duration } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/BanGroupModal.tsx b/frontend/src/component/BanGroupModal.tsx index 0b1165e1..ae453f47 100644 --- a/frontend/src/component/BanGroupModal.tsx +++ b/frontend/src/component/BanGroupModal.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import GavelIcon from '@mui/icons-material/Gavel'; import { Dialog, DialogContent, DialogTitle } from '@mui/material'; import Stack from '@mui/material/Stack'; import { useFormik } from 'formik'; -import React from 'react'; import * as yup from 'yup'; import { apiCreateBanGroup, diff --git a/frontend/src/component/BanSteamModal.tsx b/frontend/src/component/BanSteamModal.tsx index 59f8ae70..437f5563 100644 --- a/frontend/src/component/BanSteamModal.tsx +++ b/frontend/src/component/BanSteamModal.tsx @@ -1,8 +1,8 @@ +import React, { useMemo } from 'react'; import GavelIcon from '@mui/icons-material/Gavel'; import { Dialog, DialogContent, DialogTitle } from '@mui/material'; import Stack from '@mui/material/Stack'; import { useFormik } from 'formik'; -import React, { useMemo } from 'react'; import * as yup from 'yup'; import { apiCreateBanSteam, BanReason, BanType, Duration } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/ConfirmDeleteFilterModal.tsx b/frontend/src/component/ConfirmDeleteFilterModal.tsx index 0f20cf35..afed7eae 100644 --- a/frontend/src/component/ConfirmDeleteFilterModal.tsx +++ b/frontend/src/component/ConfirmDeleteFilterModal.tsx @@ -1,5 +1,5 @@ -import Stack from '@mui/material/Stack'; import React, { useCallback } from 'react'; +import Stack from '@mui/material/Stack'; import { apiDeleteFilter, Filter } from '../api/filters'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/ConfirmationModal.tsx b/frontend/src/component/ConfirmationModal.tsx index 2fd5cf86..990956e5 100644 --- a/frontend/src/component/ConfirmationModal.tsx +++ b/frontend/src/component/ConfirmationModal.tsx @@ -1,3 +1,4 @@ +import React, { JSX } from 'react'; import CheckIcon from '@mui/icons-material/Check'; import ClearIcon from '@mui/icons-material/Clear'; import { @@ -8,7 +9,6 @@ import { } from '@mui/material'; import Button from '@mui/material/Button'; import { Breakpoint } from '@mui/system'; -import React, { JSX } from 'react'; export interface ConfirmationModalProps { initialValue?: T; diff --git a/frontend/src/component/ContainerWithHeader.tsx b/frontend/src/component/ContainerWithHeader.tsx index 0d9bcf46..c255e67b 100644 --- a/frontend/src/component/ContainerWithHeader.tsx +++ b/frontend/src/component/ContainerWithHeader.tsx @@ -1,6 +1,6 @@ +import React, { JSX } from 'react'; import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; -import React, { JSX } from 'react'; import { Heading } from './Heading'; export type JustifyTypes = diff --git a/frontend/src/component/DataTable.tsx b/frontend/src/component/DataTable.tsx index eee91713..47abb158 100644 --- a/frontend/src/component/DataTable.tsx +++ b/frontend/src/component/DataTable.tsx @@ -1,3 +1,4 @@ +import React, { ReactNode, useEffect, useMemo, useState } from 'react'; import { Theme } from '@mui/material'; import MenuItem from '@mui/material/MenuItem'; import Pagination from '@mui/material/Pagination'; @@ -13,7 +14,6 @@ import TextField from '@mui/material/TextField'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import { SxProps, useTheme } from '@mui/material/styles'; -import React, { ReactNode, useEffect, useMemo, useState } from 'react'; import { LoadingSpinner } from './LoadingSpinner'; export enum RowsPerPage { diff --git a/frontend/src/component/DataTableRelativeDateField.tsx b/frontend/src/component/DataTableRelativeDateField.tsx index ddfa6a35..79f1d3a0 100644 --- a/frontend/src/component/DataTableRelativeDateField.tsx +++ b/frontend/src/component/DataTableRelativeDateField.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import { formatDistanceStrict, intervalToDuration } from 'date-fns'; import formatDistanceToNowStrict from 'date-fns/formatDistanceToNowStrict'; -import React from 'react'; export const isPermanentBan = (start: Date, end: Date): boolean => { const dur = intervalToDuration({ diff --git a/frontend/src/component/DelayedTextInput.tsx b/frontend/src/component/DelayedTextInput.tsx index 059ff652..203052eb 100644 --- a/frontend/src/component/DelayedTextInput.tsx +++ b/frontend/src/component/DelayedTextInput.tsx @@ -1,6 +1,6 @@ -import TextField from '@mui/material/TextField'; import React from 'react'; import { useTimer } from 'react-timer-hook'; +import TextField from '@mui/material/TextField'; export interface DelayedTextInputProps { delay?: number; diff --git a/frontend/src/component/DeleteServerModal.tsx b/frontend/src/component/DeleteServerModal.tsx index 114709a3..66758dd5 100644 --- a/frontend/src/component/DeleteServerModal.tsx +++ b/frontend/src/component/DeleteServerModal.tsx @@ -1,5 +1,5 @@ -import Stack from '@mui/material/Stack'; import React, { useCallback } from 'react'; +import Stack from '@mui/material/Stack'; import { apiDeleteServer, Server } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/ErrorBoundary.tsx b/frontend/src/component/ErrorBoundary.tsx index db28363a..e86e97cf 100644 --- a/frontend/src/component/ErrorBoundary.tsx +++ b/frontend/src/component/ErrorBoundary.tsx @@ -1,5 +1,5 @@ -import Typography from '@mui/material/Typography'; import React, { Component, ErrorInfo, ReactNode } from 'react'; +import Typography from '@mui/material/Typography'; import { logErr } from '../util/errors'; interface BoundaryState { diff --git a/frontend/src/component/FileUploadModal.tsx b/frontend/src/component/FileUploadModal.tsx index 94287dab..c8586db1 100644 --- a/frontend/src/component/FileUploadModal.tsx +++ b/frontend/src/component/FileUploadModal.tsx @@ -1,3 +1,4 @@ +import React, { ChangeEvent, useCallback, useState, JSX } from 'react'; import { Dialog, DialogActions, @@ -14,7 +15,6 @@ import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; import styled from '@mui/system/styled'; import { fromByteArray } from 'base64-js'; -import React, { ChangeEvent, useCallback, useState, JSX } from 'react'; import { UserUploadedFile } from '../api/media'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/Flag.tsx b/frontend/src/component/Flag.tsx index 9356be8a..8fdf3fb7 100644 --- a/frontend/src/component/Flag.tsx +++ b/frontend/src/component/Flag.tsx @@ -1,5 +1,5 @@ -import Box from '@mui/material/Box'; import React, { ReactNode } from 'react'; +import Box from '@mui/material/Box'; const br = ( { return ( diff --git a/frontend/src/component/FriendList.tsx b/frontend/src/component/FriendList.tsx index ec074cd5..3d44c4c2 100644 --- a/frontend/src/component/FriendList.tsx +++ b/frontend/src/component/FriendList.tsx @@ -1,3 +1,5 @@ +import React, { Suspense, useMemo, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import CloseIcon from '@mui/icons-material/Close'; import SearchIcon from '@mui/icons-material/Search'; import Avatar from '@mui/material/Avatar'; @@ -12,8 +14,6 @@ import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React, { Suspense, useMemo, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; import { Person } from '../api'; import { filterPerson } from '../util/text'; import { Heading } from './Heading'; diff --git a/frontend/src/component/Heading.tsx b/frontend/src/component/Heading.tsx index ffb57ae8..11916dc1 100644 --- a/frontend/src/component/Heading.tsx +++ b/frontend/src/component/Heading.tsx @@ -1,7 +1,7 @@ +import React, { FC, JSX } from 'react'; import Box from '@mui/material/Box'; import Grid from '@mui/material/Unstable_Grid2'; import { useTheme } from '@mui/material/styles'; -import React, { FC, JSX } from 'react'; import { tf2Fonts } from '../theme'; interface HeadingProps { diff --git a/frontend/src/component/HealersOverallContainer.tsx b/frontend/src/component/HealersOverallContainer.tsx index 6e1aeb24..45217baf 100644 --- a/frontend/src/component/HealersOverallContainer.tsx +++ b/frontend/src/component/HealersOverallContainer.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import InsightsIcon from '@mui/icons-material/Insights'; import Grid from '@mui/material/Unstable_Grid2'; -import React from 'react'; import { apiGetHealersOverall, HealingOverallResult } from '../api'; import { defaultFloatFmt, defaultFloatFmtPct, humanCount } from '../util/text'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/IPInput.tsx b/frontend/src/component/IPInput.tsx index 32be6ae2..cb8502fe 100644 --- a/frontend/src/component/IPInput.tsx +++ b/frontend/src/component/IPInput.tsx @@ -1,8 +1,8 @@ +import * as React from 'react'; +import { ChangeEvent, useState } from 'react'; import FormControl from '@mui/material/FormControl'; import TextField from '@mui/material/TextField'; import IPCIDR from 'ip-cidr'; -import * as React from 'react'; -import { ChangeEvent, useState } from 'react'; export interface IPInputProps { id?: string; diff --git a/frontend/src/component/InfoBar.tsx b/frontend/src/component/InfoBar.tsx index 706711bb..d45b53ed 100644 --- a/frontend/src/component/InfoBar.tsx +++ b/frontend/src/component/InfoBar.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import React from 'react'; interface InfoBarProps { title: string; diff --git a/frontend/src/component/LazyTable.tsx b/frontend/src/component/LazyTable.tsx index 400b58e5..1dee1152 100644 --- a/frontend/src/component/LazyTable.tsx +++ b/frontend/src/component/LazyTable.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import { TableSortLabel } from '@mui/material'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -7,7 +8,6 @@ import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React from 'react'; import { defaultRenderer, HeadingCell, Order } from './DataTable'; export interface LazyTableProps { diff --git a/frontend/src/component/LazyTableSimple.tsx b/frontend/src/component/LazyTableSimple.tsx index 055f96b8..0d17b14c 100644 --- a/frontend/src/component/LazyTableSimple.tsx +++ b/frontend/src/component/LazyTableSimple.tsx @@ -1,6 +1,6 @@ +import React, { useEffect, useMemo, useState } from 'react'; import { TablePagination } from '@mui/material'; import Stack from '@mui/material/Stack'; -import React, { useEffect, useMemo, useState } from 'react'; import { LazyResult } from '../api'; import { logErr } from '../util/errors'; import { diff --git a/frontend/src/component/LinearProgresWithLabel.tsx b/frontend/src/component/LinearProgresWithLabel.tsx index 62662004..faac6dca 100644 --- a/frontend/src/component/LinearProgresWithLabel.tsx +++ b/frontend/src/component/LinearProgresWithLabel.tsx @@ -1,9 +1,9 @@ +import React from 'react'; import Box from '@mui/material/Box'; import LinearProgress, { LinearProgressProps } from '@mui/material/LinearProgress'; import Typography from '@mui/material/Typography'; -import React from 'react'; export const LinearProgressWithLabel = ( props: LinearProgressProps & { value: number } diff --git a/frontend/src/component/LoadingPlaceholder.tsx b/frontend/src/component/LoadingPlaceholder.tsx index a0d27282..deb709e8 100644 --- a/frontend/src/component/LoadingPlaceholder.tsx +++ b/frontend/src/component/LoadingPlaceholder.tsx @@ -1,5 +1,5 @@ -import Box from '@mui/material/Box'; import React from 'react'; +import Box from '@mui/material/Box'; import { LoadingSpinner } from './LoadingSpinner'; export const LoadingPlaceholder = () => { diff --git a/frontend/src/component/LoadingSpinner.tsx b/frontend/src/component/LoadingSpinner.tsx index eb80cea7..c6937b82 100644 --- a/frontend/src/component/LoadingSpinner.tsx +++ b/frontend/src/component/LoadingSpinner.tsx @@ -1,7 +1,7 @@ +import React from 'react'; import { LoadingButton } from '@mui/lab'; import CircularProgress from '@mui/material/CircularProgress'; import { useTheme } from '@mui/material/styles'; -import React from 'react'; export const LoadingSpinner = () => { const theme = useTheme(); diff --git a/frontend/src/component/MDEditor.tsx b/frontend/src/component/MDEditor.tsx index fceabb62..082d10a4 100644 --- a/frontend/src/component/MDEditor.tsx +++ b/frontend/src/component/MDEditor.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState, JSX } from 'react'; import FormatBoldIcon from '@mui/icons-material/FormatBold'; import FormatIndentDecreaseIcon from '@mui/icons-material/FormatIndentDecrease'; import FormatIndentIncreaseIcon from '@mui/icons-material/FormatIndentIncrease'; @@ -12,7 +13,6 @@ import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import TextField from '@mui/material/TextField'; import Tooltip from '@mui/material/Tooltip'; -import React, { useEffect, useState, JSX } from 'react'; import { apiSaveMedia } from '../api/media'; import { renderMarkdown } from '../api/wiki'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/MapUsageContainer.tsx b/frontend/src/component/MapUsageContainer.tsx index 7068b724..cbbb4b7a 100644 --- a/frontend/src/component/MapUsageContainer.tsx +++ b/frontend/src/component/MapUsageContainer.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useMemo, useState } from 'react'; import MapIcon from '@mui/icons-material/Map'; import TabContext from '@mui/lab/TabContext'; import TabList from '@mui/lab/TabList'; @@ -8,7 +9,6 @@ import Stack from '@mui/material/Stack'; import Tab from '@mui/material/Tab'; import Grid from '@mui/material/Unstable_Grid2'; import { PieChart } from '@mui/x-charts'; -import React, { useEffect, useMemo, useState } from 'react'; import { apiGetMapUsage } from '../api'; import { logErr } from '../util/errors'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/MessageContextModal.tsx b/frontend/src/component/MessageContextModal.tsx index 895ad01c..1de3641e 100644 --- a/frontend/src/component/MessageContextModal.tsx +++ b/frontend/src/component/MessageContextModal.tsx @@ -1,5 +1,5 @@ -import Stack from '@mui/material/Stack'; import React, { useEffect, useState } from 'react'; +import Stack from '@mui/material/Stack'; import { apiGetMessageContext, IAPIBanASNRecord, PersonMessage } from '../api'; import { logErr } from '../util/errors'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/NewsList.tsx b/frontend/src/component/NewsList.tsx index 0967d724..15c49338 100644 --- a/frontend/src/component/NewsList.tsx +++ b/frontend/src/component/NewsList.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState } from 'react'; import FolderIcon from '@mui/icons-material/Folder'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; @@ -5,7 +6,6 @@ import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import Stack from '@mui/material/Stack'; import { useTheme } from '@mui/material/styles'; -import React, { useEffect, useState } from 'react'; import { apiGetNewsAll, NewsEntry } from '../api/news'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/NewsView.tsx b/frontend/src/component/NewsView.tsx index eda30c84..d11f6ca7 100644 --- a/frontend/src/component/NewsView.tsx +++ b/frontend/src/component/NewsView.tsx @@ -1,8 +1,8 @@ +import React, { useEffect } from 'react'; +import { useState } from 'react'; import { Pagination } from '@mui/material'; import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; -import React, { useEffect } from 'react'; -import { useState } from 'react'; import { apiGetNewsLatest, NewsEntry } from '../api/news'; import { renderMarkdown } from '../api/wiki'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/PersonCell.tsx b/frontend/src/component/PersonCell.tsx index 0722867f..5aebed8e 100644 --- a/frontend/src/component/PersonCell.tsx +++ b/frontend/src/component/PersonCell.tsx @@ -1,10 +1,10 @@ +import React, { MouseEventHandler } from 'react'; +import { useNavigate } from 'react-router-dom'; import Avatar from '@mui/material/Avatar'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React, { MouseEventHandler } from 'react'; -import { useNavigate } from 'react-router-dom'; export interface PersonCellProps { steam_id: string; diff --git a/frontend/src/component/PersonMessageTable.tsx b/frontend/src/component/PersonMessageTable.tsx index 5212e07c..0b74f3b1 100644 --- a/frontend/src/component/PersonMessageTable.tsx +++ b/frontend/src/component/PersonMessageTable.tsx @@ -1,10 +1,10 @@ +import React, { useState } from 'react'; import MoreVertIcon from '@mui/icons-material/MoreVert'; import Button from '@mui/material/Button'; import IconButton from '@mui/material/IconButton'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import { format } from 'date-fns'; -import React, { useState } from 'react'; import { PersonMessage } from '../api'; import { steamIdQueryValue, stringHexNumber } from '../util/text'; import { DataTable, RowsPerPage } from './DataTable'; diff --git a/frontend/src/component/PlayerClassStatsContainer.tsx b/frontend/src/component/PlayerClassStatsContainer.tsx index b2610a0f..603de806 100644 --- a/frontend/src/component/PlayerClassStatsContainer.tsx +++ b/frontend/src/component/PlayerClassStatsContainer.tsx @@ -1,7 +1,7 @@ +import React from 'react'; import BarChartIcon from '@mui/icons-material/BarChart'; import Grid from '@mui/material/Unstable_Grid2'; import { formatDistance } from 'date-fns'; -import React from 'react'; import { apiGetPlayerClassOverallStats, PlayerClassOverallResult diff --git a/frontend/src/component/PlayerMessageContext.tsx b/frontend/src/component/PlayerMessageContext.tsx index 9222dc15..dcb06827 100644 --- a/frontend/src/component/PlayerMessageContext.tsx +++ b/frontend/src/component/PlayerMessageContext.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState } from 'react'; import Box from '@mui/material/Box'; import CircularProgress from '@mui/material/CircularProgress'; import Link from '@mui/material/Link'; @@ -9,7 +10,6 @@ import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useEffect, useState } from 'react'; import { apiGetMessageContext, PersonMessage } from '../api'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/PlayerStatsOverallContainer.tsx b/frontend/src/component/PlayerStatsOverallContainer.tsx index 4e9e94f9..46825529 100644 --- a/frontend/src/component/PlayerStatsOverallContainer.tsx +++ b/frontend/src/component/PlayerStatsOverallContainer.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState, JSX } from 'react'; import BarChartIcon from '@mui/icons-material/BarChart'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -8,7 +9,6 @@ import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { formatDistance } from 'date-fns'; -import React, { useEffect, useState, JSX } from 'react'; import { apiGetPlayerStats, PlayerOverallResult } from '../api'; import { defaultFloatFmt, defaultFloatFmtPct, humanCount } from '../util/text'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/PlayersOverallContainer.tsx b/frontend/src/component/PlayersOverallContainer.tsx index 2a3b4c2a..dbd453e5 100644 --- a/frontend/src/component/PlayersOverallContainer.tsx +++ b/frontend/src/component/PlayersOverallContainer.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import InsightsIcon from '@mui/icons-material/Insights'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React from 'react'; import { apiGetPlayersOverall, PlayerWeaponStats } from '../api'; import { defaultFloatFmt, defaultFloatFmtPct, humanCount } from '../util/text'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/ProfileButton.tsx b/frontend/src/component/ProfileButton.tsx index 7e8e376b..4b0128e9 100644 --- a/frontend/src/component/ProfileButton.tsx +++ b/frontend/src/component/ProfileButton.tsx @@ -1,3 +1,5 @@ +import React from 'react'; +import { useNavigate } from 'react-router-dom'; import Avatar from '@mui/material/Avatar'; import Box from '@mui/material/Box'; import ClickAwayListener from '@mui/material/ClickAwayListener'; @@ -9,8 +11,6 @@ import Popper from '@mui/material/Popper'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React from 'react'; -import { useNavigate } from 'react-router-dom'; import { Person, Team } from '../api'; import { createExternalLinks, to } from '../util/history'; diff --git a/frontend/src/component/ProfileInfoBox.tsx b/frontend/src/component/ProfileInfoBox.tsx index 122372c1..9b2b4947 100644 --- a/frontend/src/component/ProfileInfoBox.tsx +++ b/frontend/src/component/ProfileInfoBox.tsx @@ -1,9 +1,9 @@ +import React from 'react'; import PregnantWomanIcon from '@mui/icons-material/PregnantWoman'; import Avatar from '@mui/material/Avatar'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { format, fromUnixTime } from 'date-fns'; -import React from 'react'; import { PlayerProfile } from '../api'; import { ContainerWithHeader, JustifyTypes } from './ContainerWithHeader'; diff --git a/frontend/src/component/ProfilePanel.tsx b/frontend/src/component/ProfilePanel.tsx index 9ef8887c..a9a32eb8 100644 --- a/frontend/src/component/ProfilePanel.tsx +++ b/frontend/src/component/ProfilePanel.tsx @@ -1,3 +1,4 @@ +import React, { JSX } from 'react'; import CheckIcon from '@mui/icons-material/Check'; import ClearIcon from '@mui/icons-material/Clear'; import AppBar from '@mui/material/AppBar'; @@ -8,7 +9,6 @@ import Stack from '@mui/material/Stack'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; import Typography from '@mui/material/Typography'; -import React, { JSX } from 'react'; import { PlayerProfile } from '../api'; import { Nullable } from '../util/types'; import { FriendList } from './FriendList'; diff --git a/frontend/src/component/ProfileSelectionInput.tsx b/frontend/src/component/ProfileSelectionInput.tsx index e6dc7098..9bda827a 100644 --- a/frontend/src/component/ProfileSelectionInput.tsx +++ b/frontend/src/component/ProfileSelectionInput.tsx @@ -1,10 +1,10 @@ +import React, { ChangeEvent, useState } from 'react'; +import { useTimer } from 'react-timer-hook'; import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; import HourglassBottomIcon from '@mui/icons-material/HourglassBottom'; import Avatar from '@mui/material/Avatar'; import InputAdornment from '@mui/material/InputAdornment'; import TextField from '@mui/material/TextField'; -import React, { ChangeEvent, useState } from 'react'; -import { useTimer } from 'react-timer-hook'; import { apiGetProfile, PlayerProfile } from '../api'; import { logErr } from '../util/errors'; import { Nullable } from '../util/types'; diff --git a/frontend/src/component/RenderedMarkdownBox.tsx b/frontend/src/component/RenderedMarkdownBox.tsx index 390ea466..296fb4af 100644 --- a/frontend/src/component/RenderedMarkdownBox.tsx +++ b/frontend/src/component/RenderedMarkdownBox.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import EditIcon from '@mui/icons-material/Edit'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import ButtonGroup from '@mui/material/ButtonGroup'; -import React from 'react'; export interface MarkdownBoxProps { bodyHTML: string; diff --git a/frontend/src/component/ReportComponent.tsx b/frontend/src/component/ReportComponent.tsx index 0fd43242..51cf3f4c 100644 --- a/frontend/src/component/ReportComponent.tsx +++ b/frontend/src/component/ReportComponent.tsx @@ -1,3 +1,4 @@ +import React, { useCallback, useEffect, useState, JSX } from 'react'; import FileDownloadIcon from '@mui/icons-material/FileDownload'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; @@ -9,7 +10,6 @@ import Tabs from '@mui/material/Tabs'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { useTheme } from '@mui/material/styles'; -import React, { useCallback, useEffect, useState, JSX } from 'react'; import { apiCreateReportMessage, apiDeleteReportMessage, diff --git a/frontend/src/component/ReportForm.tsx b/frontend/src/component/ReportForm.tsx index 90a7ad70..a2d2121a 100644 --- a/frontend/src/component/ReportForm.tsx +++ b/frontend/src/component/ReportForm.tsx @@ -1,3 +1,5 @@ +import React, { JSX, useCallback, useEffect, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import EditNotificationsIcon from '@mui/icons-material/EditNotifications'; import Box from '@mui/material/Box'; import FormControl from '@mui/material/FormControl'; @@ -6,8 +8,6 @@ import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; -import React, { JSX, useCallback, useEffect, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; import { apiCreateReport, BanReason, diff --git a/frontend/src/component/ReportStatusIcon.tsx b/frontend/src/component/ReportStatusIcon.tsx index b8cdd3d6..b0addc1f 100644 --- a/frontend/src/component/ReportStatusIcon.tsx +++ b/frontend/src/component/ReportStatusIcon.tsx @@ -1,9 +1,9 @@ +import React from 'react'; import CancelPresentationIcon from '@mui/icons-material/CancelPresentation'; import GavelIcon from '@mui/icons-material/Gavel'; import NewReleasesIcon from '@mui/icons-material/NewReleases'; import QuizIcon from '@mui/icons-material/Quiz'; import Tooltip from '@mui/material/Tooltip'; -import React from 'react'; import { ReportStatus } from '../api'; interface ReportStatusIconProps { diff --git a/frontend/src/component/STVListVIew.tsx b/frontend/src/component/STVListVIew.tsx index 9e1111f3..0e347235 100644 --- a/frontend/src/component/STVListVIew.tsx +++ b/frontend/src/component/STVListVIew.tsx @@ -1,3 +1,6 @@ +import React, { useMemo } from 'react'; +import { useCallback, useEffect, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import FileDownloadIcon from '@mui/icons-material/FileDownload'; import FlagIcon from '@mui/icons-material/Flag'; import Box from '@mui/material/Box'; @@ -9,9 +12,6 @@ import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; -import React, { useMemo } from 'react'; -import { useCallback, useEffect, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; import { apiGetDemos, DemoFile } from '../api'; import { useCurrentUserCtx } from '../contexts/CurrentUserCtx'; import { humanFileSize, renderDateTime } from '../util/text'; diff --git a/frontend/src/component/ServerEditorModal.tsx b/frontend/src/component/ServerEditorModal.tsx index af7afbac..57fef6ab 100644 --- a/frontend/src/component/ServerEditorModal.tsx +++ b/frontend/src/component/ServerEditorModal.tsx @@ -1,9 +1,9 @@ +import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import FormControlLabel from '@mui/material/FormControlLabel'; import FormGroup from '@mui/material/FormGroup'; import Stack from '@mui/material/Stack'; import Switch from '@mui/material/Switch'; import TextField from '@mui/material/TextField'; -import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import { apiCreateServer, SaveServerOpts, Server, apiSaveServer } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/ServerFilters.tsx b/frontend/src/component/ServerFilters.tsx index abda18f0..65fac299 100644 --- a/frontend/src/component/ServerFilters.tsx +++ b/frontend/src/component/ServerFilters.tsx @@ -1,3 +1,4 @@ +import React, { ChangeEvent, useCallback, useEffect } from 'react'; import FormControl from '@mui/material/FormControl'; import FormControlLabel from '@mui/material/FormControlLabel'; import InputLabel from '@mui/material/InputLabel'; @@ -10,7 +11,6 @@ import Switch from '@mui/material/Switch'; import Grid from '@mui/material/Unstable_Grid2'; import styled from '@mui/system/styled'; import { uniq } from 'lodash-es'; -import React, { ChangeEvent, useCallback, useEffect } from 'react'; import { useMapStateCtx } from '../contexts/MapStateCtx'; import { Heading } from './Heading'; diff --git a/frontend/src/component/ServerList.tsx b/frontend/src/component/ServerList.tsx index fcd63df4..afec6c65 100644 --- a/frontend/src/component/ServerList.tsx +++ b/frontend/src/component/ServerList.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import StorageIcon from '@mui/icons-material/Storage'; import Button from '@mui/material/Button'; @@ -5,7 +6,6 @@ import IconButton from '@mui/material/IconButton'; import Link from '@mui/material/Link'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; -import React from 'react'; import { cleanMapName } from '../api'; import { useMapStateCtx } from '../contexts/MapStateCtx'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; diff --git a/frontend/src/component/ServerMap.tsx b/frontend/src/component/ServerMap.tsx index e0d28a84..51e66d39 100644 --- a/frontend/src/component/ServerMap.tsx +++ b/frontend/src/component/ServerMap.tsx @@ -1,10 +1,10 @@ +import React, { useEffect, useMemo } from 'react'; +import { Circle, MapContainer, Marker, TileLayer, useMap } from 'react-leaflet'; import L from 'leaflet'; import * as markerIcon2x from 'leaflet/dist/images/marker-icon-2x.png'; import * as markerIcon from 'leaflet/dist/images/marker-icon.png'; import * as markerShadow from 'leaflet/dist/images/marker-shadow.png'; import 'leaflet/dist/leaflet.css'; -import React, { useEffect, useMemo } from 'react'; -import { Circle, MapContainer, Marker, TileLayer, useMap } from 'react-leaflet'; import { useMapStateCtx } from '../contexts/MapStateCtx'; // Workaround for leaflet not loading icons properly in react diff --git a/frontend/src/component/ServerSelect.tsx b/frontend/src/component/ServerSelect.tsx index 42ec3e44..e0ca287e 100644 --- a/frontend/src/component/ServerSelect.tsx +++ b/frontend/src/component/ServerSelect.tsx @@ -1,9 +1,9 @@ +import React, { useEffect, useState } from 'react'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import { SelectChangeEvent } from '@mui/material/Select'; import Select from '@mui/material/Select'; -import React, { useEffect, useState } from 'react'; import { apiGetServerStates, BaseServer } from '../api'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/SourceBansList.tsx b/frontend/src/component/SourceBansList.tsx index 9037ae9d..c0cf7b1d 100644 --- a/frontend/src/component/SourceBansList.tsx +++ b/frontend/src/component/SourceBansList.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState, JSX } from 'react'; import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; import Table from '@mui/material/Table'; @@ -7,7 +8,6 @@ import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; -import React, { useEffect, useState, JSX } from 'react'; import { apiGetSourceBans, sbBanRecord } from '../api'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/SplitHeading.tsx b/frontend/src/component/SplitHeading.tsx index b8186308..03e813b3 100644 --- a/frontend/src/component/SplitHeading.tsx +++ b/frontend/src/component/SplitHeading.tsx @@ -1,7 +1,7 @@ +import React, { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React, { FC } from 'react'; import { tf2Fonts } from '../theme'; interface SplitHeadingProps { diff --git a/frontend/src/component/StatsPanel.tsx b/frontend/src/component/StatsPanel.tsx index 1ae9bec3..874f8a19 100644 --- a/frontend/src/component/StatsPanel.tsx +++ b/frontend/src/component/StatsPanel.tsx @@ -1,3 +1,4 @@ +import React, { useEffect } from 'react'; import Paper from '@mui/material/Paper'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; @@ -5,7 +6,6 @@ import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import React, { useEffect } from 'react'; import { apiGetStats, DatabaseStats } from '../api'; import { logErr } from '../util/errors'; diff --git a/frontend/src/component/SteamIDList.tsx b/frontend/src/component/SteamIDList.tsx index 06966ef1..1f9ecc33 100644 --- a/frontend/src/component/SteamIDList.tsx +++ b/frontend/src/component/SteamIDList.tsx @@ -1,9 +1,9 @@ +import React from 'react'; import FingerprintIcon from '@mui/icons-material/Fingerprint'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import ListItemText from '@mui/material/ListItemText'; import { useTheme } from '@mui/material/styles'; -import React from 'react'; import SteamID from 'steamid'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/TabPanel.tsx b/frontend/src/component/TabPanel.tsx index bace4f41..894810fd 100644 --- a/frontend/src/component/TabPanel.tsx +++ b/frontend/src/component/TabPanel.tsx @@ -1,5 +1,5 @@ -import Box from '@mui/material/Box'; import React from 'react'; +import Box from '@mui/material/Box'; export interface TabPanelProps { children?: React.ReactNode; diff --git a/frontend/src/component/TopBar.tsx b/frontend/src/component/TopBar.tsx index e572dda3..d7786cec 100644 --- a/frontend/src/component/TopBar.tsx +++ b/frontend/src/component/TopBar.tsx @@ -1,3 +1,5 @@ +import React, { useCallback, useMemo, JSX } from 'react'; +import { useNavigate } from 'react-router-dom'; import AccountCircleIcon from '@mui/icons-material/AccountCircle'; import ArticleIcon from '@mui/icons-material/Article'; import BlockIcon from '@mui/icons-material/Block'; @@ -34,8 +36,6 @@ import Toolbar from '@mui/material/Toolbar'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React, { useCallback, useMemo, JSX } from 'react'; -import { useNavigate } from 'react-router-dom'; import SteamID from 'steamid'; import { handleOnLogin, PermissionLevel, UserNotification } from '../api'; import { useColourModeCtx } from '../contexts/ColourModeContext'; diff --git a/frontend/src/component/UnbanASNModal.tsx b/frontend/src/component/UnbanASNModal.tsx index 8533e0df..16bf4f6b 100644 --- a/frontend/src/component/UnbanASNModal.tsx +++ b/frontend/src/component/UnbanASNModal.tsx @@ -1,6 +1,6 @@ +import React, { useCallback, useState } from 'react'; import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; -import React, { useCallback, useState } from 'react'; import { apiDeleteASNBan, IAPIBanASNRecord } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/UnbanCIDRModal.tsx b/frontend/src/component/UnbanCIDRModal.tsx index fbbc545f..e840dd8f 100644 --- a/frontend/src/component/UnbanCIDRModal.tsx +++ b/frontend/src/component/UnbanCIDRModal.tsx @@ -1,7 +1,7 @@ +import React, { useCallback, useEffect, useState } from 'react'; import FormControl from '@mui/material/FormControl'; import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; -import React, { useCallback, useEffect, useState } from 'react'; import { apiDeleteCIDRBan, IAPIBanCIDRRecord } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/UnbanGroupModal.tsx b/frontend/src/component/UnbanGroupModal.tsx index 6386cd81..6e981a13 100644 --- a/frontend/src/component/UnbanGroupModal.tsx +++ b/frontend/src/component/UnbanGroupModal.tsx @@ -1,6 +1,6 @@ +import React, { useCallback, useState } from 'react'; import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; -import React, { useCallback, useState } from 'react'; import { apiDeleteGroupBan, IAPIBanGroupRecord } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/UnbanSteamModal.tsx b/frontend/src/component/UnbanSteamModal.tsx index bc0522f7..1be53b72 100644 --- a/frontend/src/component/UnbanSteamModal.tsx +++ b/frontend/src/component/UnbanSteamModal.tsx @@ -1,7 +1,7 @@ +import React, { useCallback, useState } from 'react'; import FormControl from '@mui/material/FormControl'; import Stack from '@mui/material/Stack'; import TextField from '@mui/material/TextField'; -import React, { useCallback, useState } from 'react'; import { apiDeleteBan } from '../api'; import { useUserFlashCtx } from '../contexts/UserFlashCtx'; import { ConfirmationModal, ConfirmationModalProps } from './ConfirmationModal'; diff --git a/frontend/src/component/UserMessageView.tsx b/frontend/src/component/UserMessageView.tsx index cddf632d..63fb5a07 100644 --- a/frontend/src/component/UserMessageView.tsx +++ b/frontend/src/component/UserMessageView.tsx @@ -1,3 +1,4 @@ +import React, { MouseEvent, useState } from 'react'; import MoreVertIcon from '@mui/icons-material/MoreVert'; import Avatar from '@mui/material/Avatar'; import Box from '@mui/material/Box'; @@ -9,7 +10,6 @@ import MenuItem from '@mui/material/MenuItem'; import Paper from '@mui/material/Paper'; import { useTheme } from '@mui/material/styles'; import { formatDistance, parseJSON } from 'date-fns'; -import React, { MouseEvent, useState } from 'react'; import { UserMessage, UserProfile } from '../api'; import { renderMarkdown } from '../api/wiki'; import { MDEditor } from './MDEditor'; diff --git a/frontend/src/component/WeaponsStatListContainer.tsx b/frontend/src/component/WeaponsStatListContainer.tsx index 71a81439..0c270257 100644 --- a/frontend/src/component/WeaponsStatListContainer.tsx +++ b/frontend/src/component/WeaponsStatListContainer.tsx @@ -1,9 +1,9 @@ +import React from 'react'; +import { useNavigate } from 'react-router-dom'; import Button from '@mui/material/Button'; import Link from '@mui/material/Link'; import Tooltip from '@mui/material/Tooltip'; import Grid from '@mui/material/Unstable_Grid2'; -import React from 'react'; -import { useNavigate } from 'react-router-dom'; import { LazyResult, WeaponsOverallResult } from '../api'; import { defaultFloatFmtPct, humanCount } from '../util/text'; import { ContainerWithHeader } from './ContainerWithHeader'; diff --git a/frontend/src/component/formik/ASNumberField.tsx b/frontend/src/component/formik/ASNumberField.tsx index 21815d23..38b9641d 100644 --- a/frontend/src/component/formik/ASNumberField.tsx +++ b/frontend/src/component/formik/ASNumberField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const ASNumberFieldValidator = yup diff --git a/frontend/src/component/formik/BanReasonField.tsx b/frontend/src/component/formik/BanReasonField.tsx index 152efc5f..f52d5861 100644 --- a/frontend/src/component/formik/BanReasonField.tsx +++ b/frontend/src/component/formik/BanReasonField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { BanReason, BanReasons, banReasonsList } from '../../api'; diff --git a/frontend/src/component/formik/BanReasonTextField.tsx b/frontend/src/component/formik/BanReasonTextField.tsx index f071a8a4..4bbb77c8 100644 --- a/frontend/src/component/formik/BanReasonTextField.tsx +++ b/frontend/src/component/formik/BanReasonTextField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { BanReason } from '../../api'; diff --git a/frontend/src/component/formik/BanTypeField.tsx b/frontend/src/component/formik/BanTypeField.tsx index 70fe8986..e5fb0132 100644 --- a/frontend/src/component/formik/BanTypeField.tsx +++ b/frontend/src/component/formik/BanTypeField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { BanType } from '../../api'; diff --git a/frontend/src/component/formik/DescriptionField.tsx b/frontend/src/component/formik/DescriptionField.tsx index fc950d7b..d55fa8e7 100644 --- a/frontend/src/component/formik/DescriptionField.tsx +++ b/frontend/src/component/formik/DescriptionField.tsx @@ -1,8 +1,8 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const descriptionValidator = yup diff --git a/frontend/src/component/formik/DiscordRequiredField.tsx b/frontend/src/component/formik/DiscordRequiredField.tsx index 46e9b540..8e746ea6 100644 --- a/frontend/src/component/formik/DiscordRequiredField.tsx +++ b/frontend/src/component/formik/DiscordRequiredField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormControlLabel from '@mui/material/FormControlLabel'; import FormGroup from '@mui/material/FormGroup'; import FormHelperText from '@mui/material/FormHelperText'; import Switch from '@mui/material/Switch'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const discordRequiredValidator = yup diff --git a/frontend/src/component/formik/DurationCustomField.tsx b/frontend/src/component/formik/DurationCustomField.tsx index 0ae7ea41..67e5b6ec 100644 --- a/frontend/src/component/formik/DurationCustomField.tsx +++ b/frontend/src/component/formik/DurationCustomField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { Duration } from '../../api'; diff --git a/frontend/src/component/formik/DurationField.tsx b/frontend/src/component/formik/DurationField.tsx index e056c812..1b17bc9e 100644 --- a/frontend/src/component/formik/DurationField.tsx +++ b/frontend/src/component/formik/DurationField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { Duration, Durations } from '../../api'; diff --git a/frontend/src/component/formik/GameConfigField.tsx b/frontend/src/component/formik/GameConfigField.tsx index 947573d9..6772bf1b 100644 --- a/frontend/src/component/formik/GameConfigField.tsx +++ b/frontend/src/component/formik/GameConfigField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export enum GameConfig { diff --git a/frontend/src/component/formik/GameTypeField.tsx b/frontend/src/component/formik/GameTypeField.tsx index f29a9aa0..eeb1e2f4 100644 --- a/frontend/src/component/formik/GameTypeField.tsx +++ b/frontend/src/component/formik/GameTypeField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export enum GameType { diff --git a/frontend/src/component/formik/GroupIdField.tsx b/frontend/src/component/formik/GroupIdField.tsx index 1ac7efa1..20164637 100644 --- a/frontend/src/component/formik/GroupIdField.tsx +++ b/frontend/src/component/formik/GroupIdField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const GroupIdFieldValidator = yup diff --git a/frontend/src/component/formik/MapSelectionField.tsx b/frontend/src/component/formik/MapSelectionField.tsx index 15d3e214..ab12723d 100644 --- a/frontend/src/component/formik/MapSelectionField.tsx +++ b/frontend/src/component/formik/MapSelectionField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; import { emptyOrNullString } from '../../util/types'; diff --git a/frontend/src/component/formik/ModalButtons.tsx b/frontend/src/component/formik/ModalButtons.tsx index 50f31592..40b2e6dc 100644 --- a/frontend/src/component/formik/ModalButtons.tsx +++ b/frontend/src/component/formik/ModalButtons.tsx @@ -1,9 +1,9 @@ +import React from 'react'; import CheckIcon from '@mui/icons-material/Check'; import ClearIcon from '@mui/icons-material/Clear'; import { LoadingButton } from '@mui/lab'; import { DialogActions } from '@mui/material'; import Button from '@mui/material/Button'; -import React from 'react'; interface ModalButtonsProps { formId: string; diff --git a/frontend/src/component/formik/NetworkRangeField.tsx b/frontend/src/component/formik/NetworkRangeField.tsx index 0220edad..c77c31be 100644 --- a/frontend/src/component/formik/NetworkRangeField.tsx +++ b/frontend/src/component/formik/NetworkRangeField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const NetworkRangeFieldValidator = yup diff --git a/frontend/src/component/formik/NoteField.tsx b/frontend/src/component/formik/NoteField.tsx index bd582ad4..8c815477 100644 --- a/frontend/src/component/formik/NoteField.tsx +++ b/frontend/src/component/formik/NoteField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const NoteFieldValidator = yup.string().label('Hidden Moderator Note'); diff --git a/frontend/src/component/formik/ReportIdField.tsx b/frontend/src/component/formik/ReportIdField.tsx index 692051ca..ea16c7ba 100644 --- a/frontend/src/component/formik/ReportIdField.tsx +++ b/frontend/src/component/formik/ReportIdField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const ReportIdFieldValidator = yup diff --git a/frontend/src/component/formik/ServerSelectionField.tsx b/frontend/src/component/formik/ServerSelectionField.tsx index 2d693318..624b07ea 100644 --- a/frontend/src/component/formik/ServerSelectionField.tsx +++ b/frontend/src/component/formik/ServerSelectionField.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import FormControl from '@mui/material/FormControl'; import FormHelperText from '@mui/material/FormHelperText'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import * as yup from 'yup'; export const serverValidator = yup diff --git a/frontend/src/component/formik/SteamIdField.tsx b/frontend/src/component/formik/SteamIdField.tsx index 4be93b4f..10d57513 100644 --- a/frontend/src/component/formik/SteamIdField.tsx +++ b/frontend/src/component/formik/SteamIdField.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import TextField from '@mui/material/TextField'; import { FormikHandlers, FormikState } from 'formik/dist/types'; -import React from 'react'; import SteamID from 'steamid'; import * as yup from 'yup'; import { apiGetProfile, PlayerProfile } from '../../api'; diff --git a/frontend/src/component/modal/Buttons.tsx b/frontend/src/component/modal/Buttons.tsx index 48e1ef20..41ef7628 100644 --- a/frontend/src/component/modal/Buttons.tsx +++ b/frontend/src/component/modal/Buttons.tsx @@ -1,10 +1,10 @@ +import React from 'react'; import CheckIcon from '@mui/icons-material/Check'; import ClearIcon from '@mui/icons-material/Clear'; import CloseIcon from '@mui/icons-material/Close'; import RestartAltIcon from '@mui/icons-material/RestartAlt'; import SaveIcon from '@mui/icons-material/Save'; import Button from '@mui/material/Button'; -import React from 'react'; interface onClickProps { onClick?: () => void; diff --git a/frontend/src/component/modal/Confirm.tsx b/frontend/src/component/modal/Confirm.tsx index 6cf93e3e..17857eac 100644 --- a/frontend/src/component/modal/Confirm.tsx +++ b/frontend/src/component/modal/Confirm.tsx @@ -1,3 +1,4 @@ +import React, { useCallback, useState } from 'react'; import NiceModal, { muiDialogV5, useModal } from '@ebay/nice-modal-react'; import CheckIcon from '@mui/icons-material/Check'; import { @@ -9,7 +10,6 @@ import { import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useTheme } from '@mui/material/styles'; -import React, { useCallback, useState } from 'react'; import { Heading } from '../Heading'; import { LoadingSpinner } from '../LoadingSpinner'; import { CancelButton, ConfirmButton } from './Buttons'; diff --git a/frontend/src/component/modal/ContestEditor.tsx b/frontend/src/component/modal/ContestEditor.tsx index 0f7be522..ad8894ac 100644 --- a/frontend/src/component/modal/ContestEditor.tsx +++ b/frontend/src/component/modal/ContestEditor.tsx @@ -1,3 +1,4 @@ +import React, { useMemo, useState } from 'react'; import NiceModal, { useModal, muiDialogV5 } from '@ebay/nice-modal-react'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; import { @@ -19,7 +20,6 @@ import TextField from '@mui/material/TextField'; import { DateTimePicker } from '@mui/x-date-pickers'; import { DateTimeValidationError } from '@mui/x-date-pickers'; import { useFormik } from 'formik'; -import React, { useMemo, useState } from 'react'; import * as yup from 'yup'; import { EmptyUUID, PermissionLevel, useContest } from '../../api'; import { apiContestSave } from '../../api'; diff --git a/frontend/src/component/modal/ContestEntryModal.tsx b/frontend/src/component/modal/ContestEntryModal.tsx index c6cf6d04..7017d1b8 100644 --- a/frontend/src/component/modal/ContestEntryModal.tsx +++ b/frontend/src/component/modal/ContestEntryModal.tsx @@ -1,3 +1,4 @@ +import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import NiceModal, { useModal, muiDialogV5 } from '@ebay/nice-modal-react'; import CloudUploadIcon from '@mui/icons-material/CloudUpload'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; @@ -15,7 +16,6 @@ import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { fromByteArray } from 'base64-js'; import { useFormik } from 'formik'; -import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import * as yup from 'yup'; import { apiContestEntrySave, EmptyUUID, useContest } from '../../api'; import { apiSaveContestEntryMedia, UserUploadedFile } from '../../api/media'; diff --git a/frontend/src/contexts/ColourModeContext.tsx b/frontend/src/contexts/ColourModeContext.tsx index 558fa66c..1f957313 100644 --- a/frontend/src/contexts/ColourModeContext.tsx +++ b/frontend/src/contexts/ColourModeContext.tsx @@ -1,5 +1,5 @@ -import { noop } from 'lodash-es'; import React, { useContext } from 'react'; +import { noop } from 'lodash-es'; export const ColourModeContext = React.createContext({ toggleColorMode: () => { diff --git a/frontend/src/contexts/MapStateCtx.tsx b/frontend/src/contexts/MapStateCtx.tsx index ace40088..00f4d8b6 100644 --- a/frontend/src/contexts/MapStateCtx.tsx +++ b/frontend/src/contexts/MapStateCtx.tsx @@ -1,6 +1,6 @@ +import { createContext, useContext } from 'react'; import { LatLngLiteral } from 'leaflet'; import noop from 'lodash-es/noop'; -import { createContext, useContext } from 'react'; import { BaseServer } from '../api'; export type MapState = { diff --git a/frontend/src/contexts/NotificationsCtx.tsx b/frontend/src/contexts/NotificationsCtx.tsx index 38d721f3..c1d9cb8b 100644 --- a/frontend/src/contexts/NotificationsCtx.tsx +++ b/frontend/src/contexts/NotificationsCtx.tsx @@ -1,4 +1,3 @@ -import { noop } from 'lodash-es'; import React, { createContext, Dispatch, @@ -8,6 +7,7 @@ import React, { JSX, useEffect } from 'react'; +import { noop } from 'lodash-es'; import { apiGetNotifications, NotificationsQuery, diff --git a/frontend/src/contexts/UserFlashCtx.tsx b/frontend/src/contexts/UserFlashCtx.tsx index 61fe57df..71d38d6e 100644 --- a/frontend/src/contexts/UserFlashCtx.tsx +++ b/frontend/src/contexts/UserFlashCtx.tsx @@ -1,6 +1,6 @@ +import { createContext, useContext } from 'react'; import { AlertColor } from '@mui/material/Alert'; import { noop } from 'lodash-es'; -import { createContext, useContext } from 'react'; import { Flash } from '../component/Flashes'; export type CurrentFlashes = { diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index ba473c67..79b85d2d 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,6 +1,6 @@ -import { PaletteMode } from '@mui/material'; import React from 'react'; import { createRoot } from 'react-dom/client'; +import { PaletteMode } from '@mui/material'; import { App } from './App'; // extend window with our own items that we inject diff --git a/frontend/src/page/AdminAppeals.tsx b/frontend/src/page/AdminAppeals.tsx index b89ed47a..9efa21b2 100644 --- a/frontend/src/page/AdminAppeals.tsx +++ b/frontend/src/page/AdminAppeals.tsx @@ -1,3 +1,5 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { Link } from 'react-router-dom'; import { TablePagination } from '@mui/material'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; @@ -14,8 +16,6 @@ import Grid from '@mui/material/Unstable_Grid2'; import format from 'date-fns/format'; import { addDays, isAfter, isBefore } from 'date-fns/fp'; import { noop } from 'lodash-es'; -import React, { useEffect, useMemo, useState } from 'react'; -import { Link } from 'react-router-dom'; import { apiGetAppeals, AppealOverview, diff --git a/frontend/src/page/AdminBan.tsx b/frontend/src/page/AdminBan.tsx index 58c8c81d..503a2b37 100644 --- a/frontend/src/page/AdminBan.tsx +++ b/frontend/src/page/AdminBan.tsx @@ -1,3 +1,5 @@ +import React, { useCallback, useEffect, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import EditIcon from '@mui/icons-material/Edit'; import GavelIcon from '@mui/icons-material/Gavel'; import UndoIcon from '@mui/icons-material/Undo'; @@ -15,8 +17,6 @@ import Grid from '@mui/material/Unstable_Grid2'; import { useTheme } from '@mui/material/styles'; import { formatDuration, intervalToDuration } from 'date-fns'; import format from 'date-fns/format'; -import React, { useCallback, useEffect, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; import { apiGetBansSteam, apiGetBansASN, diff --git a/frontend/src/page/AdminContests.tsx b/frontend/src/page/AdminContests.tsx index 9c3fbca3..e277f89e 100644 --- a/frontend/src/page/AdminContests.tsx +++ b/frontend/src/page/AdminContests.tsx @@ -1,3 +1,4 @@ +import React, { useCallback } from 'react'; import NiceModal, { useModal } from '@ebay/nice-modal-react'; import DeleteIcon from '@mui/icons-material/Delete'; import EditIcon from '@mui/icons-material/Edit'; @@ -7,7 +8,6 @@ import Button from '@mui/material/Button'; import ButtonGroup from '@mui/material/ButtonGroup'; import Stack from '@mui/material/Stack'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useCallback } from 'react'; import { apiContestDelete, apiContests } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { LazyTableSimple } from '../component/LazyTableSimple'; diff --git a/frontend/src/page/AdminFilters.tsx b/frontend/src/page/AdminFilters.tsx index 582500fc..9d84095b 100644 --- a/frontend/src/page/AdminFilters.tsx +++ b/frontend/src/page/AdminFilters.tsx @@ -1,3 +1,4 @@ +import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import AddBoxIcon from '@mui/icons-material/AddBox'; import DeleteForeverIcon from '@mui/icons-material/DeleteForever'; import EditIcon from '@mui/icons-material/Edit'; @@ -18,7 +19,6 @@ import TextField from '@mui/material/TextField'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { ChangeEvent, useCallback, useEffect, useState } from 'react'; import { apiGetFilters, apiSaveFilter, Filter } from '../api/filters'; import { ConfirmDeleteFilterModal } from '../component/ConfirmDeleteFilterModal'; import { DataTable, RowsPerPage } from '../component/DataTable'; diff --git a/frontend/src/page/AdminImport.tsx b/frontend/src/page/AdminImport.tsx index 001a8d9a..fc3d8aad 100644 --- a/frontend/src/page/AdminImport.tsx +++ b/frontend/src/page/AdminImport.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React from 'react'; export const AdminImport = () => { return ( diff --git a/frontend/src/page/AdminNetworkPage.tsx b/frontend/src/page/AdminNetworkPage.tsx index 30f53181..6285916b 100644 --- a/frontend/src/page/AdminNetworkPage.tsx +++ b/frontend/src/page/AdminNetworkPage.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import Box from '@mui/material/Box'; import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; @@ -7,7 +8,6 @@ import Tabs from '@mui/material/Tabs'; import TextField from '@mui/material/TextField'; import Grid from '@mui/material/Unstable_Grid2'; import IPCIDR from 'ip-cidr'; -import React from 'react'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { a11yProps } from '../component/ProfilePanel'; import { TabPanel } from '../component/TabPanel'; diff --git a/frontend/src/page/AdminNews.tsx b/frontend/src/page/AdminNews.tsx index 40bfcad9..36074313 100644 --- a/frontend/src/page/AdminNews.tsx +++ b/frontend/src/page/AdminNews.tsx @@ -1,3 +1,4 @@ +import React, { useCallback, useEffect, useState } from 'react'; import PublishedWithChangesIcon from '@mui/icons-material/PublishedWithChanges'; import SaveIcon from '@mui/icons-material/Save'; import UnpublishedIcon from '@mui/icons-material/Unpublished'; @@ -11,7 +12,6 @@ import Tabs from '@mui/material/Tabs'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useCallback, useEffect, useState } from 'react'; import { apiNewsSave, NewsEntry } from '../api/news'; import { renderMarkdown } from '../api/wiki'; import { NewsList } from '../component/NewsList'; diff --git a/frontend/src/page/AdminPeople.tsx b/frontend/src/page/AdminPeople.tsx index a0c4dac6..24416fb0 100644 --- a/frontend/src/page/AdminPeople.tsx +++ b/frontend/src/page/AdminPeople.tsx @@ -1,8 +1,8 @@ +import React, { useEffect, useState, JSX } from 'react'; import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useEffect, useState, JSX } from 'react'; import { apiGetPeople, Person } from '../api'; import { DataTable } from '../component/DataTable'; import { PersonCell } from '../component/PersonCell'; diff --git a/frontend/src/page/AdminReports.tsx b/frontend/src/page/AdminReports.tsx index 73d7fe78..b543350a 100644 --- a/frontend/src/page/AdminReports.tsx +++ b/frontend/src/page/AdminReports.tsx @@ -1,3 +1,5 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; import { Select } from '@mui/material'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; @@ -10,8 +12,6 @@ import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { parseISO } from 'date-fns'; import format from 'date-fns/format'; -import React, { useEffect, useMemo, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; import { apiGetReports, ReportStatus, diff --git a/frontend/src/page/AdminServers.tsx b/frontend/src/page/AdminServers.tsx index 1c1ec9c6..889e27b2 100644 --- a/frontend/src/page/AdminServers.tsx +++ b/frontend/src/page/AdminServers.tsx @@ -1,3 +1,4 @@ +import React, { useCallback, useEffect, useState } from 'react'; import CreateIcon from '@mui/icons-material/Create'; import DeleteIcon from '@mui/icons-material/Delete'; import EditIcon from '@mui/icons-material/Edit'; @@ -8,7 +9,6 @@ import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; import Tooltip from '@mui/material/Tooltip'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useCallback, useEffect, useState } from 'react'; import { apiGetServersAdmin, Server } from '../api'; import { DataTable } from '../component/DataTable'; import { DeleteServerModal } from '../component/DeleteServerModal'; diff --git a/frontend/src/page/BanPage.tsx b/frontend/src/page/BanPage.tsx index 4d7a90c7..b3a24824 100644 --- a/frontend/src/page/BanPage.tsx +++ b/frontend/src/page/BanPage.tsx @@ -1,3 +1,5 @@ +import React, { useCallback, useEffect, useMemo, useState, JSX } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; import AddModeratorIcon from '@mui/icons-material/AddModerator'; import DocumentScannerIcon from '@mui/icons-material/DocumentScanner'; import InfoIcon from '@mui/icons-material/Info'; @@ -14,8 +16,6 @@ import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useCallback, useEffect, useMemo, useState, JSX } from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; import { apiCreateBanMessage, apiDeleteBanMessage, diff --git a/frontend/src/page/ChatLogPage.tsx b/frontend/src/page/ChatLogPage.tsx index 397c5529..0d7c0c13 100644 --- a/frontend/src/page/ChatLogPage.tsx +++ b/frontend/src/page/ChatLogPage.tsx @@ -1,3 +1,6 @@ +import React, { useCallback, useEffect, useState } from 'react'; +import { useNavigate } from 'react-router-dom'; +import { useTimer } from 'react-timer-hook'; import ChatIcon from '@mui/icons-material/Chat'; import FilterAltIcon from '@mui/icons-material/FilterAlt'; import FlagIcon from '@mui/icons-material/Flag'; @@ -24,9 +27,6 @@ import Grid from '@mui/material/Unstable_Grid2'; import { DesktopDatePicker } from '@mui/x-date-pickers/DesktopDatePicker'; import { parseISO } from 'date-fns'; import { formatISO9075 } from 'date-fns/fp'; -import React, { useCallback, useEffect, useState } from 'react'; -import { useNavigate } from 'react-router-dom'; -import { useTimer } from 'react-timer-hook'; import stc from 'string-to-color'; import { apiGetMessages, diff --git a/frontend/src/page/ContestListPage.tsx b/frontend/src/page/ContestListPage.tsx index f9798407..ffc4fd3e 100644 --- a/frontend/src/page/ContestListPage.tsx +++ b/frontend/src/page/ContestListPage.tsx @@ -1,3 +1,5 @@ +import React, { useCallback } from 'react'; +import { Link as RouterLink } from 'react-router-dom'; import NiceModal from '@ebay/nice-modal-react'; import InsightsIcon from '@mui/icons-material/Insights'; import PublishIcon from '@mui/icons-material/Publish'; @@ -8,8 +10,6 @@ import Grid from '@mui/material/Unstable_Grid2'; import { format } from 'date-fns'; import formatDistanceToNowStrict from 'date-fns/formatDistanceToNowStrict'; import { isAfter } from 'date-fns/fp'; -import React, { useCallback } from 'react'; -import { Link as RouterLink } from 'react-router-dom'; import { apiContests, Contest } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { LazyTableSimple } from '../component/LazyTableSimple'; diff --git a/frontend/src/page/ContestPage.tsx b/frontend/src/page/ContestPage.tsx index d114824b..bd0cf770 100644 --- a/frontend/src/page/ContestPage.tsx +++ b/frontend/src/page/ContestPage.tsx @@ -1,3 +1,5 @@ +import React, { useCallback } from 'react'; +import { useParams } from 'react-router-dom'; import NiceModal from '@ebay/nice-modal-react'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; import InfoIcon from '@mui/icons-material/Info'; @@ -15,8 +17,6 @@ import Grid from '@mui/material/Unstable_Grid2'; import { format } from 'date-fns'; import formatDistanceToNowStrict from 'date-fns/formatDistanceToNowStrict'; import { isAfter } from 'date-fns/fp'; -import React, { useCallback } from 'react'; -import { useParams } from 'react-router-dom'; import { defaultAvatarHash, useContest, useContestEntries } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { InfoBar } from '../component/InfoBar'; diff --git a/frontend/src/page/Home.tsx b/frontend/src/page/Home.tsx index e49b43b5..9a11fff6 100644 --- a/frontend/src/page/Home.tsx +++ b/frontend/src/page/Home.tsx @@ -1,3 +1,5 @@ +import React, { JSX } from 'react'; +import { useNavigate } from 'react-router-dom'; import AttachMoneyIcon from '@mui/icons-material/AttachMoney'; import ChatIcon from '@mui/icons-material/Chat'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; @@ -12,8 +14,6 @@ import Button from '@mui/material/Button'; import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { JSX } from 'react'; -import { useNavigate } from 'react-router-dom'; import { NewsView } from '../component/NewsView'; import { useCurrentUserCtx } from '../contexts/CurrentUserCtx'; diff --git a/frontend/src/page/Login.tsx b/frontend/src/page/Login.tsx index 421aaac5..8ff6a4fe 100644 --- a/frontend/src/page/Login.tsx +++ b/frontend/src/page/Login.tsx @@ -1,10 +1,10 @@ +import React, { useMemo } from 'react'; import DoDisturbIcon from '@mui/icons-material/DoDisturb'; import Button from '@mui/material/Button'; import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useMemo } from 'react'; import SteamID from 'steamid'; import { handleOnLogin } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; diff --git a/frontend/src/page/LoginDiscordSuccess.tsx b/frontend/src/page/LoginDiscordSuccess.tsx index 87c60e1e..31902b3d 100644 --- a/frontend/src/page/LoginDiscordSuccess.tsx +++ b/frontend/src/page/LoginDiscordSuccess.tsx @@ -1,6 +1,6 @@ -import Typography from '@mui/material/Typography'; import React, { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; +import Typography from '@mui/material/Typography'; import { apiLinkDiscord } from '../api'; import { logErr } from '../util/errors'; diff --git a/frontend/src/page/LoginSteamSuccess.tsx b/frontend/src/page/LoginSteamSuccess.tsx index 71deb023..2c270c54 100644 --- a/frontend/src/page/LoginSteamSuccess.tsx +++ b/frontend/src/page/LoginSteamSuccess.tsx @@ -1,6 +1,6 @@ -import Typography from '@mui/material/Typography'; import React, { useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; +import Typography from '@mui/material/Typography'; import { refreshKey, tokenKey } from '../api'; import { useCurrentUserCtx } from '../contexts/CurrentUserCtx'; diff --git a/frontend/src/page/MatchListPage.tsx b/frontend/src/page/MatchListPage.tsx index 0635134a..1b221793 100644 --- a/frontend/src/page/MatchListPage.tsx +++ b/frontend/src/page/MatchListPage.tsx @@ -1,3 +1,5 @@ +import React, { JSX, useEffect, useState } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; import CheckIcon from '@mui/icons-material/Check'; import CloseIcon from '@mui/icons-material/Close'; import TimelineIcon from '@mui/icons-material/Timeline'; @@ -6,8 +8,6 @@ import { IconButton, TablePagination } from '@mui/material'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { JSX, useEffect, useState } from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; import { apiGetMatches, MatchesQueryOpts, MatchSummary } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { Order, RowsPerPage } from '../component/DataTable'; diff --git a/frontend/src/page/MatchPage.tsx b/frontend/src/page/MatchPage.tsx index 2de44c08..1b5f9a9f 100644 --- a/frontend/src/page/MatchPage.tsx +++ b/frontend/src/page/MatchPage.tsx @@ -1,3 +1,5 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; import GpsFixedIcon from '@mui/icons-material/GpsFixed'; import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; import MasksIcon from '@mui/icons-material/Masks'; @@ -15,8 +17,6 @@ import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { useTheme } from '@mui/material/styles'; import { formatDistance } from 'date-fns'; -import React, { useEffect, useMemo, useState } from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; import { apiGetMatch, MatchHealer, diff --git a/frontend/src/page/NotificationsPage.tsx b/frontend/src/page/NotificationsPage.tsx index 0e81190f..a95b98f9 100644 --- a/frontend/src/page/NotificationsPage.tsx +++ b/frontend/src/page/NotificationsPage.tsx @@ -1,3 +1,4 @@ +import React, { useEffect, useState } from 'react'; import DeleteSweepIcon from '@mui/icons-material/DeleteSweep'; import DoneAllIcon from '@mui/icons-material/DoneAll'; import EmailIcon from '@mui/icons-material/Email'; @@ -11,7 +12,6 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import Grid2 from '@mui/material/Unstable_Grid2'; import { parseISO } from 'date-fns'; -import React, { useEffect, useState } from 'react'; import { UserNotification } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { RowsPerPage } from '../component/DataTable'; diff --git a/frontend/src/page/PageNotFound.tsx b/frontend/src/page/PageNotFound.tsx index 4e3b185c..c4090aff 100644 --- a/frontend/src/page/PageNotFound.tsx +++ b/frontend/src/page/PageNotFound.tsx @@ -1,6 +1,6 @@ +import React from 'react'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React from 'react'; interface PageNotFoundProps { error?: string; diff --git a/frontend/src/page/PatreonPage.tsx b/frontend/src/page/PatreonPage.tsx index d70e868e..adfc3b48 100644 --- a/frontend/src/page/PatreonPage.tsx +++ b/frontend/src/page/PatreonPage.tsx @@ -1,5 +1,5 @@ -import Grid from '@mui/material/Unstable_Grid2'; import React from 'react'; +import Grid from '@mui/material/Unstable_Grid2'; export const PatreonPage = () => { return ( diff --git a/frontend/src/page/PlayerStatsPage.tsx b/frontend/src/page/PlayerStatsPage.tsx index e1e64321..5b3aaa6c 100644 --- a/frontend/src/page/PlayerStatsPage.tsx +++ b/frontend/src/page/PlayerStatsPage.tsx @@ -1,6 +1,6 @@ -import Grid from '@mui/material/Unstable_Grid2'; import React, { JSX } from 'react'; import { useParams } from 'react-router-dom'; +import Grid from '@mui/material/Unstable_Grid2'; import { PlayerClassStatsContainer } from '../component/PlayerClassStatsContainer'; import { PageNotFound } from './PageNotFound'; diff --git a/frontend/src/page/Profile.tsx b/frontend/src/page/Profile.tsx index 35a1f447..11859a4f 100644 --- a/frontend/src/page/Profile.tsx +++ b/frontend/src/page/Profile.tsx @@ -1,3 +1,5 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { useParams } from 'react-router'; import InsightsIcon from '@mui/icons-material/Insights'; import LinkIcon from '@mui/icons-material/Link'; import LocalLibraryIcon from '@mui/icons-material/LocalLibrary'; @@ -7,8 +9,6 @@ import Chip from '@mui/material/Chip'; import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useEffect, useMemo, useState } from 'react'; -import { useParams } from 'react-router'; import SteamID from 'steamid'; import { apiGetPlayerWeaponsOverall, diff --git a/frontend/src/page/ProfileSettingsPage.tsx b/frontend/src/page/ProfileSettingsPage.tsx index d349752e..cde3504e 100644 --- a/frontend/src/page/ProfileSettingsPage.tsx +++ b/frontend/src/page/ProfileSettingsPage.tsx @@ -1,3 +1,4 @@ +import React, { JSX } from 'react'; import AddLinkIcon from '@mui/icons-material/AddLink'; import ChatBubbleIcon from '@mui/icons-material/ChatBubble'; import LinkIcon from '@mui/icons-material/Link'; @@ -6,7 +7,6 @@ import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; -import React, { JSX } from 'react'; import { discordLoginURL } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { useCurrentUserCtx } from '../contexts/CurrentUserCtx'; diff --git a/frontend/src/page/ReportCreatePage.tsx b/frontend/src/page/ReportCreatePage.tsx index a48c21ef..fbe4a5fb 100644 --- a/frontend/src/page/ReportCreatePage.tsx +++ b/frontend/src/page/ReportCreatePage.tsx @@ -1,3 +1,5 @@ +import React, { useEffect, useMemo, useState, JSX } from 'react'; +import { Link as RouterLink, useNavigate } from 'react-router-dom'; import HistoryIcon from '@mui/icons-material/History'; import InfoIcon from '@mui/icons-material/Info'; import VisibilityIcon from '@mui/icons-material/Visibility'; @@ -12,8 +14,6 @@ import Stack from '@mui/material/Stack'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useEffect, useMemo, useState, JSX } from 'react'; -import { Link as RouterLink, useNavigate } from 'react-router-dom'; import { apiGetReports, reportStatusString, ReportWithAuthor } from '../api'; import { ContainerWithHeader } from '../component/ContainerWithHeader'; import { DataTable } from '../component/DataTable'; diff --git a/frontend/src/page/ReportViewPage.tsx b/frontend/src/page/ReportViewPage.tsx index 019dfa4d..e495b1e6 100644 --- a/frontend/src/page/ReportViewPage.tsx +++ b/frontend/src/page/ReportViewPage.tsx @@ -1,3 +1,5 @@ +import React, { useCallback, useEffect, useState, JSX } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; import GavelIcon from '@mui/icons-material/Gavel'; import SendIcon from '@mui/icons-material/Send'; import Avatar from '@mui/material/Avatar'; @@ -16,8 +18,6 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { useTheme } from '@mui/material/styles'; -import React, { useCallback, useEffect, useState, JSX } from 'react'; -import { useNavigate, useParams } from 'react-router-dom'; import { apiGetBansSteam, apiGetReport, diff --git a/frontend/src/page/STVPage.tsx b/frontend/src/page/STVPage.tsx index 6928e22c..734effc4 100644 --- a/frontend/src/page/STVPage.tsx +++ b/frontend/src/page/STVPage.tsx @@ -1,6 +1,6 @@ +import React, { JSX } from 'react'; import Paper from '@mui/material/Paper'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { JSX } from 'react'; import { STVListVIew } from '../component/STVListVIew'; export const STVPage = (): JSX.Element => { diff --git a/frontend/src/page/Servers.tsx b/frontend/src/page/Servers.tsx index f37ebd44..3962f4ed 100644 --- a/frontend/src/page/Servers.tsx +++ b/frontend/src/page/Servers.tsx @@ -1,3 +1,5 @@ +import React, { useState } from 'react'; +import { useTimer } from 'react-timer-hook'; import Box from '@mui/material/Box'; import Container from '@mui/material/Container'; import LinearProgress, { @@ -9,8 +11,6 @@ import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; import { LatLngLiteral } from 'leaflet'; import { sum } from 'lodash-es'; -import React, { useState } from 'react'; -import { useTimer } from 'react-timer-hook'; import { apiGetServerStates, BaseServer } from '../api'; import { ServerFilters } from '../component/ServerFilters'; import { ServerList } from '../component/ServerList'; diff --git a/frontend/src/page/StatsPage.tsx b/frontend/src/page/StatsPage.tsx index a08334b1..cd68b659 100644 --- a/frontend/src/page/StatsPage.tsx +++ b/frontend/src/page/StatsPage.tsx @@ -1,6 +1,6 @@ +import React, { JSX } from 'react'; import InsightsIcon from '@mui/icons-material/Insights'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { JSX } from 'react'; import { apiGetWeaponsOverall } from '../api'; import { HealersOverallContainer } from '../component/HealersOverallContainer'; import { MapUsageContainer } from '../component/MapUsageContainer'; diff --git a/frontend/src/page/StatsWeaponOverallPage.tsx b/frontend/src/page/StatsWeaponOverallPage.tsx index 0627e2e3..9106238e 100644 --- a/frontend/src/page/StatsWeaponOverallPage.tsx +++ b/frontend/src/page/StatsWeaponOverallPage.tsx @@ -1,7 +1,7 @@ -import InsightsIcon from '@mui/icons-material/Insights'; -import Grid from '@mui/material/Unstable_Grid2'; import React, { JSX, useState } from 'react'; import { useParams } from 'react-router'; +import InsightsIcon from '@mui/icons-material/Insights'; +import Grid from '@mui/material/Unstable_Grid2'; import { apiGetPlayerWeaponStats, PlayerWeaponStatsResponse, diff --git a/frontend/src/page/WikiPage.tsx b/frontend/src/page/WikiPage.tsx index e1e2ad68..6163ce72 100644 --- a/frontend/src/page/WikiPage.tsx +++ b/frontend/src/page/WikiPage.tsx @@ -1,11 +1,11 @@ +import React, { useCallback, useEffect, useMemo, JSX } from 'react'; +import { useParams } from 'react-router'; import ArticleIcon from '@mui/icons-material/Article'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; import Grid from '@mui/material/Unstable_Grid2'; -import React, { useCallback, useEffect, useMemo, JSX } from 'react'; -import { useParams } from 'react-router'; import { PermissionLevel } from '../api'; import { apiGetWikiPage,