Skip to content

Commit

Permalink
Update sorting priority
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Oct 21, 2023
1 parent fda1999 commit 98cd7fe
Show file tree
Hide file tree
Showing 125 changed files with 157 additions and 157 deletions.
6 changes: 3 additions & 3 deletions frontend/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"@trivago/prettier-plugin-sort-imports"
],
"importOrder": [
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"^react$",
"^react-.*$",
"<THIRD_PARTY_MODULES>",
"^[./]"
],
"importOrderSeparation": false
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/BanASNModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/BanCIDRModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/BanGroupModal.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/BanSteamModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/ConfirmDeleteFilterModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { JSX } from 'react';
import CheckIcon from '@mui/icons-material/Check';
import ClearIcon from '@mui/icons-material/Clear';
import {
Expand All @@ -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<T> {
initialValue?: T;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/ContainerWithHeader.tsx
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/DataTable.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/DataTableRelativeDateField.tsx
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/DelayedTextInput.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/DeleteServerModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/FileUploadModal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { ChangeEvent, useCallback, useState, JSX } from 'react';
import {
Dialog,
DialogActions,
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/Flag.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Box from '@mui/material/Box';
import React, { ReactNode } from 'react';
import Box from '@mui/material/Box';

const br = (
<svg
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/Flashes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { JSX } from 'react';
import Alert from '@mui/material/Alert';
import { AlertColor } from '@mui/material/Alert';
import React, { JSX } from 'react';
import { useUserFlashCtx } from '../contexts/UserFlashCtx';

export interface Flash {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { JSX } from 'react';
import Box from '@mui/material/Box';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';
import React, { JSX } from 'react';

export const Footer = (): JSX.Element => {
return (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/FriendList.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/Heading.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/HealersOverallContainer.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/IPInput.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/InfoBar.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/LazyTable.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<T> {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/LazyTableSimple.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/LinearProgresWithLabel.tsx
Original file line number Diff line number Diff line change
@@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/LoadingPlaceholder.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/LoadingSpinner.tsx
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/MDEditor.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/MapUsageContainer.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/MessageContextModal.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/NewsList.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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';
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';

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/NewsView.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/PersonCell.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/PersonMessageTable.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/PlayerClassStatsContainer.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/PlayerMessageContext.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/PlayerStatsOverallContainer.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';
Expand Down
Loading

0 comments on commit 98cd7fe

Please sign in to comment.