From 448f2be549b5d66e17feaac6782ae784dcb7fea6 Mon Sep 17 00:00:00 2001 From: kirill Date: Tue, 1 Jul 2025 14:49:39 +0300 Subject: [PATCH 01/10] feat: tree-shaking mui, mui-icons and sdk; refactor search bar a bit; preload fonts; add terser minification; reduce layout shift on home page --- packages/apps/dashboard/client/index.html | 8 ++- .../src/app/providers/ThemeProvider.tsx | 8 +-- .../client/src/app/styles/_home-page.scss | 4 -- .../src/features/graph/ui/AreaChart.tsx | 3 +- .../src/features/graph/ui/ChartTooltip.tsx | 3 +- .../src/features/graph/ui/CustomXAxisTick.tsx | 2 +- .../src/features/graph/ui/SmallGraph.tsx | 10 +-- .../src/features/graph/ui/ToggleButtons.tsx | 2 +- .../src/features/graph/ui/ToggleCharts.tsx | 4 +- .../features/leaderboard/ui/AddressCell.tsx | 2 +- .../src/features/leaderboard/ui/ChainCell.tsx | 2 +- .../src/features/leaderboard/ui/RoleCell.tsx | 2 +- .../model/addressDetailsSchema.ts | 2 +- .../features/searchResults/ui/HmtPrice.tsx | 3 +- .../searchResults/ui/OperatorAddress.tsx | 2 +- .../ui/OperatorEscrows/EscrowsTableBody.tsx | 2 +- .../searchResults/ui/ReputationScore.tsx | 3 +- .../searchResults/ui/SearchResults.tsx | 2 +- .../searchResults/ui/TablePagination.tsx | 2 +- .../searchResults/ui/TitleSectionWrapper.tsx | 2 +- .../client/src/pages/home/ui/HomePage.tsx | 9 +-- .../shared/ui/AbbreviateClipboard/index.tsx | 2 +- .../src/shared/ui/CustomTooltip/index.tsx | 2 +- .../client/src/shared/ui/EntityIcon/index.tsx | 2 +- .../src/shared/ui/NetworkIcon/index.tsx | 2 +- .../client/src/shared/ui/SearchBar/index.tsx | 67 ++++++++++--------- .../client/src/shared/ui/theme/index.tsx | 4 +- .../client/src/widgets/footer/ui/Footer.tsx | 3 +- .../client/src/widgets/header/ui/Header.tsx | 2 +- .../src/widgets/header/ui/ThemeModeSwitch.tsx | 3 +- packages/apps/dashboard/client/vite.config.ts | 9 +++ 31 files changed, 95 insertions(+), 78 deletions(-) diff --git a/packages/apps/dashboard/client/index.html b/packages/apps/dashboard/client/index.html index 3b1a160e05..a0dd3c354e 100644 --- a/packages/apps/dashboard/client/index.html +++ b/packages/apps/dashboard/client/index.html @@ -9,10 +9,12 @@ /> - + /> --> + + HUMAN Dashboard diff --git a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx index 82045f6af2..9633ba8ee5 100644 --- a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx +++ b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx @@ -7,11 +7,9 @@ import { useState, } from 'react'; -import { - CssBaseline, - PaletteMode, - ThemeProvider as MuiThemeProvider, -} from '@mui/material'; +import { PaletteMode } from '@mui/material'; +import CssBaseline from '@mui/material/CssBaseline'; +import MuiThemeProvider from '@mui/material/styles/ThemeProvider'; import { createAppTheme } from '@/shared/ui/theme'; diff --git a/packages/apps/dashboard/client/src/app/styles/_home-page.scss b/packages/apps/dashboard/client/src/app/styles/_home-page.scss index e0c55f0895..28f2715d44 100644 --- a/packages/apps/dashboard/client/src/app/styles/_home-page.scss +++ b/packages/apps/dashboard/client/src/app/styles/_home-page.scss @@ -1,7 +1,3 @@ -.home-page-search { - margin-top: 24px; -} - .home-page-leaderboard { margin-top: 60px; } diff --git a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx index 73a297367d..05087b9c6d 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx @@ -1,8 +1,9 @@ import { FC, useEffect, useRef, useState } from 'react'; -import { Typography, useTheme } from '@mui/material'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; +import useTheme from '@mui/material/styles/useTheme'; +import Typography from '@mui/material/Typography'; import dayjs, { Dayjs } from 'dayjs'; import { CartesianGrid, diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx index a1c474da5b..cca00686d3 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx @@ -1,10 +1,11 @@ import { FC } from 'react'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; -import { Grid, Typography } from '@mui/material'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; +import Grid from '@mui/material/Grid'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { TooltipProps } from 'recharts'; import FormattedNumber from '@/shared/ui/FormattedNumber'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx index 7d351507c6..596172a8f3 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx @@ -1,4 +1,4 @@ -import { useTheme } from '@mui/material'; +import useTheme from '@mui/material/styles/useTheme'; // @ts-expect-error -- import error, but this type work property import { ContentRenderer } from 'recharts'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx index f03d15b7d0..382c1f4b1a 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx @@ -1,19 +1,19 @@ import { FC, Fragment } from 'react'; -import { useTheme } from '@mui/material'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; +import useTheme from '@mui/material/styles/useTheme'; import Typography from '@mui/material/Typography'; import { - AreaChart, Area, - XAxis, - YAxis, + AreaChart, CartesianGrid, - Tooltip, ResponsiveContainer, + Tooltip, TooltipProps, + XAxis, + YAxis, } from 'recharts'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx index 9ef5a320b4..032683a1fb 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx @@ -1,5 +1,5 @@ -import { styled } from '@mui/material'; import Button from '@mui/material/Button'; +import styled from '@mui/material/styles/styled'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; import dayjs from 'dayjs'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx index b699b14f8d..93dbbd9711 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx @@ -1,8 +1,10 @@ import { FC } from 'react'; -import { FormControlLabel, FormGroup, Typography } from '@mui/material'; import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormGroup from '@mui/material/FormGroup'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import FormattedNumber from '@/shared/ui/FormattedNumber'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx index f2935aa8fa..b4ace2d08b 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk'; +import { ChainId } from '@human-protocol/sdk/src/enums'; import Box from '@mui/material/Box'; import AbbreviateClipboard from '@/shared/ui/AbbreviateClipboard'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx index 028b9dcaf2..a3c6d39e3c 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk'; +import { ChainId } from '@human-protocol/sdk/src/enums'; import Typography from '@mui/material/Typography'; import { getNetwork } from '@/shared/lib/networks'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx index f65a2a7da4..ce42e3faaf 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx @@ -1,6 +1,6 @@ import { FC, PropsWithChildren } from 'react'; -import { Launch as LaunchIcon } from '@mui/icons-material'; +import LaunchIcon from '@mui/icons-material/Launch'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; import { Link } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts index 10b6b53ddd..3be852eeaa 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts +++ b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts @@ -1,4 +1,4 @@ -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import { z } from 'zod'; import { reputationSchema } from '@/features/leaderboard/model/leaderboardSchema'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx index be07a28276..7d0233744f 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx @@ -1,4 +1,5 @@ -import { Typography, Stack } from '@mui/material'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import useHmtPrice from '@/shared/api/useHmtPrice'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx index 9f47bdbbc8..af44e069b5 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; import Link from '@mui/material/Link'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx index 34cbef9bdd..e351ccb48b 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx @@ -1,10 +1,10 @@ import { FC } from 'react'; -import { TableRow } from '@mui/material'; import CircularProgress from '@mui/material/CircularProgress'; import Link from '@mui/material/Link'; import MuiTableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; +import TableRow from '@mui/material/TableRow'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import useGlobalFiltersStore from '@/shared/store/useGlobalFiltersStore'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx index 6dc9a20c09..3b5805b026 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx @@ -1,4 +1,5 @@ -import { Chip, useTheme } from '@mui/material'; +import Chip from '@mui/material/Chip'; +import useTheme from '@mui/material/styles/useTheme'; type Reputation = 'High' | 'Medium' | 'Low' | 'Unknown'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx index e9b30182a3..dafe56181c 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -import { Stack } from '@mui/material'; +import Stack from '@mui/material/Stack'; import { AxiosError } from 'axios'; import { useLocation, useParams } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx index a0611b80ee..0331272779 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx @@ -1,6 +1,6 @@ import { FC, useEffect } from 'react'; -import { TablePagination as MuiTablePagination } from '@mui/material'; +import MuiTablePagination from '@mui/material/TablePagination'; import useGlobalFiltersStore from '@/shared/store/useGlobalFiltersStore'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx index 3eacd67706..68f7378b2a 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx @@ -1,9 +1,9 @@ import { FC, PropsWithChildren } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; -import { SxProps } from '@mui/material'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; +import { SxProps } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import CustomTooltip from '@/shared/ui/CustomTooltip'; diff --git a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx index a92bd05c73..eb6b808bf7 100644 --- a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx +++ b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC, lazy } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; @@ -14,7 +14,6 @@ import HmtPrice from '@/features/home/ui/HmtPrice'; import Holders from '@/features/home/ui/Holders'; import TotalNumberOfTasks from '@/features/home/ui/TotalNumberOfTasks'; import TotalTransactions from '@/features/home/ui/TotalTransactions'; -import Leaderboard from '@/features/leaderboard'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import CustomTooltip from '@/shared/ui/CustomTooltip'; import LeaderboardIcon from '@/shared/ui/icons/LeaderboardIcon'; @@ -22,6 +21,8 @@ import SearchBar from '@/shared/ui/SearchBar'; import ShadowIcon from '@/shared/ui/ShadowIcon'; import PageWrapper from '@/widgets/page-wrapper'; +const Leaderboard = lazy(() => import('@/features/leaderboard')); + const CardWrapper = styled(Grid)(({ theme }) => ({ display: 'flex', background: theme.palette.white.main, @@ -66,10 +67,10 @@ const HomePage: FC = () => { return ( - + All HUMAN activity. In one place. - + diff --git a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx index 83c1e14638..8e132e36d1 100644 --- a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import { Link } from '@mui/material'; import IconButton from '@mui/material/IconButton'; +import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useNavigate } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx index 4002edbb51..23da9e43ee 100644 --- a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx @@ -1,4 +1,4 @@ -import { Tooltip, TooltipProps } from '@mui/material'; +import Tooltip, { TooltipProps } from '@mui/material/Tooltip'; const CustomTooltip = (props: TooltipProps) => { return ; diff --git a/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx index 2ae1ceb6a0..868933cbeb 100644 --- a/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx @@ -1,4 +1,4 @@ -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import ExchangeOracleIcon from '@/shared/ui/icons/ExchangeOracleIcon'; import HumanIcon from '@/shared/ui/icons/HumanIcon'; diff --git a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx index 5126ad866e..c7f06e9d66 100644 --- a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx @@ -1,4 +1,4 @@ -import { ChainId } from '@human-protocol/sdk'; +import { ChainId } from '@human-protocol/sdk/src/enums'; import BinanceSmartChainIcon from '@/shared/ui/icons/BinanceSmartChainIcon'; import EthereumIcon from '@/shared/ui/icons/EthereumIcon'; diff --git a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx index 939908955f..58524bf48b 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx @@ -2,21 +2,18 @@ import { FC, useCallback, useEffect, useState } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import SearchIcon from '@mui/icons-material/Search'; -import { - InputAdornment, - TextField, - Select as MuiSelect, - SelectChangeEvent, - Grid, - MenuItem, - Box, - CircularProgress, - useTheme, -} from '@mui/material'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import Grid from '@mui/material/Grid'; import IconButton from '@mui/material/IconButton'; -import clsx from 'clsx'; -import { useNavigate } from 'react-router-dom'; - +import InputAdornment from '@mui/material/InputAdornment'; +import MenuItem from '@mui/material/MenuItem'; +import MuiSelect, { SelectChangeEvent } from '@mui/material/Select'; +import useTheme from '@mui/material/styles/useTheme'; +import TextField from '@mui/material/TextField'; +import { useLocation, useNavigate } from 'react-router-dom'; + +import { ROUTES } from '@/app/config/routes'; import useFilteredNetworks from '@/shared/api/useFilteredNetworks'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import isValidEvmAddress from '@/shared/lib/isValidEvmAddress'; @@ -34,23 +31,16 @@ import { gridSx, } from './styles'; -type SearchBarProps = { - className?: string; - initialInputValue?: string; -}; - -const SearchBar: FC = ({ - className = '', - initialInputValue = '', -}) => { - const isMobile = useIsMobile(); +const SearchBar: FC = () => { + const [inputValue, setInputValue] = useState(''); + const [error, setError] = useState(''); + const [focus, setFocus] = useState(false); const { filteredNetworks, isLoading } = useFilteredNetworks(); const { address, chainId, setChainId, setAddress } = useGlobalFiltersStore(); const navigate = useNavigate(); - const [inputValue, setInputValue] = useState(initialInputValue); - const [error, setError] = useState(null); - const [focus, setFocus] = useState(false); + const isMobile = useIsMobile(); const theme = useTheme(); + const location = useLocation(); useEffect(() => { setInputValue(address); @@ -77,11 +67,11 @@ const SearchBar: FC = ({ setInputValue(value); if (isValidEvmAddress(value)) { - setError(null); + setError(''); } else if (value.length > 0) { setError('Invalid EVM address. Must start with 0x and be 42 characters.'); } else { - setError(null); + setError(''); } }; @@ -91,7 +81,7 @@ const SearchBar: FC = ({ const handleClearClick = () => { setInputValue(''); - setError(null); + setError(''); }; const handleSubmit = (event: React.FormEvent) => { @@ -99,7 +89,20 @@ const SearchBar: FC = ({ navigateToAddress(); }; - if (isLoading) return ; + if (isLoading) { + const color = + location.pathname === ROUTES.HOME ? 'white.main' : 'primary.main'; + return ( + + + + ); + } const renderEmptyValue = ( @@ -121,7 +124,7 @@ const SearchBar: FC = ({ ); return ( -
+ Date: Tue, 1 Jul 2025 15:33:56 +0300 Subject: [PATCH 02/10] feat: add meta tags to index html --- packages/apps/dashboard/client/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/apps/dashboard/client/index.html b/packages/apps/dashboard/client/index.html index a0dd3c354e..1ee73f6530 100644 --- a/packages/apps/dashboard/client/index.html +++ b/packages/apps/dashboard/client/index.html @@ -2,7 +2,8 @@ - + + Date: Tue, 1 Jul 2025 18:34:51 +0300 Subject: [PATCH 03/10] feat: improve accessibility, remove lazy loading of leaderboard --- .../client/src/features/leaderboard/ui/RoleCell.tsx | 7 +++++-- .../client/src/features/searchResults/ui/Clipboard.tsx | 1 + .../ui/WalletTransactions/TransactionsTableBody.tsx | 6 +++++- .../apps/dashboard/client/src/pages/home/ui/HomePage.tsx | 5 ++--- .../client/src/shared/ui/AbbreviateClipboard/index.tsx | 1 + .../dashboard/client/src/shared/ui/SearchBar/index.tsx | 6 +++++- .../apps/dashboard/client/src/widgets/header/ui/Header.tsx | 2 +- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx index ce42e3faaf..b451fd8e36 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx @@ -59,13 +59,16 @@ const RoleCell: FC = ({ rank, role, websiteUrl, name }) => { - + {formattedName ?? humanReadableRole} {websiteUrl ? : null} {name && role ? ( - + {humanReadableRole} ) : null} diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx index 7d4c256570..c418b05497 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx @@ -43,6 +43,7 @@ const Clipboard: FC = ({ value }) => { { navigator.clipboard.writeText(value); setTooltipOpen(true); diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx index f1725e4252..992eeef6f6 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx @@ -75,7 +75,11 @@ const TransactionsTableBody: FC = ({ data, isLoading, error }) => { {elem.internalTransactions.length > 0 && ( - toggleRow(idx)} size="small"> + toggleRow(idx)} + size="small" + > {expandedRows[idx] ? ( ) : ( diff --git a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx index eb6b808bf7..f33de09c47 100644 --- a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx +++ b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx @@ -1,4 +1,4 @@ -import { FC, lazy } from 'react'; +import { FC } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; @@ -14,6 +14,7 @@ import HmtPrice from '@/features/home/ui/HmtPrice'; import Holders from '@/features/home/ui/Holders'; import TotalNumberOfTasks from '@/features/home/ui/TotalNumberOfTasks'; import TotalTransactions from '@/features/home/ui/TotalTransactions'; +import Leaderboard from '@/features/leaderboard'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import CustomTooltip from '@/shared/ui/CustomTooltip'; import LeaderboardIcon from '@/shared/ui/icons/LeaderboardIcon'; @@ -21,8 +22,6 @@ import SearchBar from '@/shared/ui/SearchBar'; import ShadowIcon from '@/shared/ui/ShadowIcon'; import PageWrapper from '@/widgets/page-wrapper'; -const Leaderboard = lazy(() => import('@/features/leaderboard')); - const CardWrapper = styled(Grid)(({ theme }) => ({ display: 'flex', background: theme.palette.white.main, diff --git a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx index 8e132e36d1..5c665fb461 100644 --- a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx @@ -57,6 +57,7 @@ const AbbreviateClipboard = ({ value, link }: AbbreviateClipboardProps) => { )} { navigator.clipboard.writeText(value); setTooltipOpen(true); diff --git a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx index 58524bf48b..c78bd66e87 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx @@ -172,7 +172,11 @@ const SearchBar: FC = () => { ), endAdornment: inputValue && ( - + { height: { xs: 62, md: 82 }, }} > - + From 51776e61c2033b8540c3dd6f120126b9e8a9259e Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 14:13:27 +0300 Subject: [PATCH 04/10] fix: change reputation values to lower case --- .../features/leaderboard/model/leaderboardSchema.ts | 4 ++-- .../src/features/searchResults/ui/ReputationScore.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts index 03bb6609f7..4dede35faa 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts +++ b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts @@ -3,13 +3,13 @@ import { z } from 'zod'; export const reputationSchema = z.unknown().transform((value) => { try { const knownReputation = z - .union([z.literal('Low'), z.literal('Medium'), z.literal('High')]) + .union([z.literal('low'), z.literal('medium'), z.literal('high')]) .parse(value); return knownReputation; } catch (error) { console.error(error); - return 'Unknown'; + return 'unknown'; } }); diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx index 3b5805b026..6c53bf1266 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx @@ -1,7 +1,7 @@ import Chip from '@mui/material/Chip'; import useTheme from '@mui/material/styles/useTheme'; -type Reputation = 'High' | 'Medium' | 'Low' | 'Unknown'; +import { Reputation } from '@/features/leaderboard/model/leaderboardSchema'; type Props = { reputation: Reputation; @@ -16,28 +16,28 @@ const ReputationScore = ({ reputation }: Props) => { const theme = useTheme(); const reputationAttributes: Record = { - High: { + high: { title: 'High', colors: { title: theme.palette.success.main, border: theme.palette.success.light, }, }, - Medium: { + medium: { title: 'Medium', colors: { title: theme.palette.warning.main, border: theme.palette.warning.light, }, }, - Low: { + low: { title: 'Low', colors: { title: theme.palette.orange.main, border: theme.palette.orange.light, }, }, - Unknown: { + unknown: { title: 'Coming soon', colors: { title: theme.palette.ocean.main, From ec38874cde2d769840c2fd300653e71f79c6439f Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 14:23:21 +0300 Subject: [PATCH 05/10] refactor: move reputationSchema to the shared/model --- .../leaderboard/model/leaderboardSchema.ts | 15 +-------------- .../searchResults/model/addressDetailsSchema.ts | 2 +- .../searchResults/ui/ReputationScore.tsx | 2 +- .../client/src/shared/model/reputationSchema.ts | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 packages/apps/dashboard/client/src/shared/model/reputationSchema.ts diff --git a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts index 4dede35faa..9d66199cda 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts +++ b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts @@ -1,19 +1,6 @@ import { z } from 'zod'; -export const reputationSchema = z.unknown().transform((value) => { - try { - const knownReputation = z - .union([z.literal('low'), z.literal('medium'), z.literal('high')]) - .parse(value); - - return knownReputation; - } catch (error) { - console.error(error); - return 'unknown'; - } -}); - -export type Reputation = z.infer; +import { reputationSchema } from '@/shared/model/reputationSchema'; const leaderboardEntity = z.object({ address: z.string(), diff --git a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts index 3be852eeaa..e12e5844ee 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts +++ b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts @@ -1,7 +1,7 @@ import { Role } from '@human-protocol/sdk/src/constants'; import { z } from 'zod'; -import { reputationSchema } from '@/features/leaderboard/model/leaderboardSchema'; +import { reputationSchema } from '@/shared/model/reputationSchema'; const transformOptionalTokenAmount = ( value: string | undefined | null, diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx index 6c53bf1266..add33f3c01 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx @@ -1,7 +1,7 @@ import Chip from '@mui/material/Chip'; import useTheme from '@mui/material/styles/useTheme'; -import { Reputation } from '@/features/leaderboard/model/leaderboardSchema'; +import { Reputation } from '@/shared/model/reputationSchema'; type Props = { reputation: Reputation; diff --git a/packages/apps/dashboard/client/src/shared/model/reputationSchema.ts b/packages/apps/dashboard/client/src/shared/model/reputationSchema.ts new file mode 100644 index 0000000000..92b074435e --- /dev/null +++ b/packages/apps/dashboard/client/src/shared/model/reputationSchema.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +export const reputationSchema = z.unknown().transform((value) => { + try { + const knownReputation = z + .union([z.literal('low'), z.literal('medium'), z.literal('high')]) + .parse(value); + + return knownReputation; + } catch (error) { + console.error(error); + return 'unknown'; + } +}); + +export type Reputation = z.infer; From 7727bc77275a2d50d7b6235bda9cc84a9bbb232d Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 14:52:56 +0300 Subject: [PATCH 06/10] fix: set min heght to page container, that helps to avoid layout shift on footer --- .../apps/dashboard/client/src/app/styles/_page-wrapper.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss b/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss index 647bdf1945..d51f35de55 100644 --- a/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss +++ b/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss @@ -12,10 +12,15 @@ .container { margin: auto; padding: 30px 80px 100px; + min-height: calc(100vh - 82px); @media (max-width: 1200px) { padding: 24px 16px; } + + @media (max-width: 900px) { + min-height: calc(100vh - 62px); + } } @media (max-width: 600px) { From 19576f8de80226345289747fa87ccc081ed0b9b0 Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 15:29:02 +0300 Subject: [PATCH 07/10] fix: make cards adaptive to chart's height --- packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx index f33de09c47..fb32ad217a 100644 --- a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx +++ b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx @@ -28,7 +28,7 @@ const CardWrapper = styled(Grid)(({ theme }) => ({ borderRadius: '16px', padding: '24px 32px', [theme.breakpoints.up('md')]: { - height: 300, + height: '100%', }, [theme.breakpoints.down('md')]: { height: 'auto', From 8b1d9a341bc55c93679dbcfe11af08bea8e2df16 Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 15:48:09 +0300 Subject: [PATCH 08/10] fix: remove commented code --- packages/apps/dashboard/client/index.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/apps/dashboard/client/index.html b/packages/apps/dashboard/client/index.html index 1ee73f6530..bbab1e01ee 100644 --- a/packages/apps/dashboard/client/index.html +++ b/packages/apps/dashboard/client/index.html @@ -10,10 +10,6 @@ /> - From 50294a45786875463e3d1e7dc9600da5ca4240ca Mon Sep 17 00:00:00 2001 From: kirill Date: Wed, 2 Jul 2025 15:58:55 +0300 Subject: [PATCH 09/10] fix: leave console after compress --- packages/apps/dashboard/client/vite.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/apps/dashboard/client/vite.config.ts b/packages/apps/dashboard/client/vite.config.ts index b8bd01c27c..ad7d6b888e 100644 --- a/packages/apps/dashboard/client/vite.config.ts +++ b/packages/apps/dashboard/client/vite.config.ts @@ -27,7 +27,6 @@ export default defineConfig({ minify: 'terser', terserOptions: { compress: { - drop_console: true, drop_debugger: true, unused: true, dead_code: true, From fad7ba079d2a1f0553b5f3f758607abb13dcab74 Mon Sep 17 00:00:00 2001 From: kirill Date: Thu, 3 Jul 2025 10:15:52 +0300 Subject: [PATCH 10/10] feat: add consistent type imports --- packages/apps/dashboard/client/eslint.config.js | 1 + packages/apps/dashboard/client/src/app/AppRoutes.tsx | 2 +- .../dashboard/client/src/app/providers/ThemeProvider.tsx | 6 +++--- .../client/src/features/graph/api/useChartData.ts | 4 ++-- .../src/features/graph/store/useChartParamsStore.ts | 2 +- .../dashboard/client/src/features/graph/ui/AreaChart.tsx | 6 +++--- .../client/src/features/graph/ui/ChartTooltip.tsx | 6 +++--- .../client/src/features/graph/ui/CustomXAxisTick.tsx | 2 +- .../client/src/features/graph/ui/GraphSwiper.tsx | 2 +- .../dashboard/client/src/features/graph/ui/SmallGraph.tsx | 4 ++-- .../client/src/features/graph/ui/ToggleButtons.tsx | 2 +- .../client/src/features/graph/ui/ToggleCharts.tsx | 2 +- .../client/src/features/leaderboard/ui/AddressCell.tsx | 4 ++-- .../client/src/features/leaderboard/ui/CategoryCell.tsx | 2 +- .../client/src/features/leaderboard/ui/ChainCell.tsx | 4 ++-- .../src/features/leaderboard/ui/DataGridWrapper.tsx | 4 ++-- .../client/src/features/leaderboard/ui/Leaderboard.tsx | 2 +- .../client/src/features/leaderboard/ui/RoleCell.tsx | 2 +- .../client/src/features/leaderboard/ui/SelectNetwork.tsx | 2 +- .../client/src/features/leaderboard/ui/TextCell.tsx | 2 +- .../client/src/features/leaderboard/ui/useDataGrid.tsx | 4 ++-- .../client/src/features/searchResults/ui/Clipboard.tsx | 2 +- .../src/features/searchResults/ui/EscrowAddress.tsx | 4 ++-- .../client/src/features/searchResults/ui/HmtBalance.tsx | 2 +- .../src/features/searchResults/ui/OperatorAddress.tsx | 4 ++-- .../searchResults/ui/OperatorEscrows/EscrowsTable.tsx | 2 +- .../searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx | 4 ++-- .../ui/OperatorEscrows/EscrowsTableBodyContainer.tsx | 2 +- .../src/features/searchResults/ui/ReputationScore.tsx | 2 +- .../src/features/searchResults/ui/SearchResults.tsx | 2 +- .../client/src/features/searchResults/ui/StakeInfo.tsx | 2 +- .../src/features/searchResults/ui/TablePagination.tsx | 2 +- .../src/features/searchResults/ui/TitleSectionWrapper.tsx | 4 ++-- .../client/src/features/searchResults/ui/TokenAmount.tsx | 2 +- .../src/features/searchResults/ui/WalletAddress.tsx | 4 ++-- .../ui/WalletTransactions/TransactionsTableBody.tsx | 4 ++-- .../WalletTransactions/TransactionsTableBodyContainer.tsx | 2 +- .../apps/dashboard/client/src/pages/home/ui/HomePage.tsx | 2 +- .../dashboard/client/src/shared/ui/Breadcrumbs/index.tsx | 2 +- .../client/src/shared/ui/CustomTooltip/index.tsx | 2 +- .../dashboard/client/src/shared/ui/DatePicker/index.tsx | 8 ++++---- .../client/src/shared/ui/FormattedNumber/index.tsx | 2 +- .../dashboard/client/src/shared/ui/NetworkIcon/index.tsx | 2 +- .../dashboard/client/src/shared/ui/SearchBar/index.tsx | 4 ++-- .../dashboard/client/src/shared/ui/SearchBar/styles.ts | 2 +- .../client/src/shared/ui/SectionWrapper/index.tsx | 2 +- .../dashboard/client/src/shared/ui/ShadowIcon/index.tsx | 2 +- .../client/src/shared/ui/icons/BinanceSmartChainIcon.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/DiscordIcon.tsx | 6 +++--- .../client/src/shared/ui/icons/EscrowAddressIcon.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/EthereumIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/ExchangeOracleIcon.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/HumanIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/JobLauncherIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/LeaderboardIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/LightModeIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/LogoBlockIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/LogoBlockIconMobile.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/PolygonIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/RecordingOracleIcon.tsx | 4 ++-- .../client/src/shared/ui/icons/ReputationOracleIcon.tsx | 4 ++-- .../dashboard/client/src/shared/ui/icons/WalletIcon.tsx | 4 ++-- .../apps/dashboard/client/src/shared/ui/theme/index.tsx | 6 +++--- .../dashboard/client/src/widgets/footer/ui/Footer.tsx | 2 +- .../dashboard/client/src/widgets/header/ui/Header.tsx | 2 +- .../client/src/widgets/header/ui/ThemeModeSwitch.tsx | 2 +- .../client/src/widgets/page-wrapper/ui/PageWrapper.tsx | 2 +- 68 files changed, 109 insertions(+), 108 deletions(-) diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js index dcf3e17b34..a253b2d2e5 100644 --- a/packages/apps/dashboard/client/eslint.config.js +++ b/packages/apps/dashboard/client/eslint.config.js @@ -72,6 +72,7 @@ export default tseslint.config( ], 'import/no-duplicates': 'error', 'import/no-unresolved': 'error', + '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], '@typescript-eslint/no-explicit-any': 'error', 'no-console': ['error', { allow: ['warn', 'error'] }], diff --git a/packages/apps/dashboard/client/src/app/AppRoutes.tsx b/packages/apps/dashboard/client/src/app/AppRoutes.tsx index 866ee88553..1ca3459cef 100644 --- a/packages/apps/dashboard/client/src/app/AppRoutes.tsx +++ b/packages/apps/dashboard/client/src/app/AppRoutes.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx index 9633ba8ee5..a4e372457c 100644 --- a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx +++ b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx @@ -1,13 +1,13 @@ import { - FC, - PropsWithChildren, + type FC, + type PropsWithChildren, useCallback, useEffect, useMemo, useState, } from 'react'; -import { PaletteMode } from '@mui/material'; +import type { PaletteMode } from '@mui/material'; import CssBaseline from '@mui/material/CssBaseline'; import MuiThemeProvider from '@mui/material/styles/ThemeProvider'; diff --git a/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts b/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts index b6e27a522d..5f0c24e2b5 100644 --- a/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts +++ b/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts @@ -10,11 +10,11 @@ import validateResponse from '@/shared/lib/validateResponse'; import { hcaptchaDailyStatsSchema, - HcaptchaDailyStats, + type HcaptchaDailyStats, } from '../model/hcaptchaDailyStatsSchema'; import { hmtDailyStatsSchema, - HMTDailyStats, + type HMTDailyStats, } from '../model/hmtDailyStatsSchema'; export type ChartData = (HMTDailyStats & Omit)[]; diff --git a/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts b/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts index 7755ed615d..28f2fcdc64 100644 --- a/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts +++ b/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts @@ -1,4 +1,4 @@ -import dayjs, { Dayjs } from 'dayjs'; +import dayjs, { type Dayjs } from 'dayjs'; import { create } from 'zustand'; const MINIMAL_DATE_FOR_DATE_PICKER = '2021-04-06'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx index 05087b9c6d..cfe54a390c 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx @@ -1,10 +1,10 @@ -import { FC, useEffect, useRef, useState } from 'react'; +import { type FC, useEffect, useRef, useState } from 'react'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; import useTheme from '@mui/material/styles/useTheme'; import Typography from '@mui/material/Typography'; -import dayjs, { Dayjs } from 'dayjs'; +import dayjs, { type Dayjs } from 'dayjs'; import { CartesianGrid, Tooltip, @@ -17,7 +17,7 @@ import { import DatePicker from '@/shared/ui/DatePicker'; -import useChartData, { ChartData } from '../api/useChartData'; +import useChartData, { type ChartData } from '../api/useChartData'; import formatNumber from '../lib/formatNumber'; import useChartParamsStore, { initialAllTime, diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx index cca00686d3..98cb87e7a5 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; import Box from '@mui/material/Box'; @@ -6,13 +6,13 @@ import Card from '@mui/material/Card'; import Grid from '@mui/material/Grid'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import { TooltipProps } from 'recharts'; +import type { TooltipProps } from 'recharts'; import FormattedNumber from '@/shared/ui/FormattedNumber'; import formatDate from '../lib/formatDate'; -import { ChartDataConfigObject } from './AreaChart'; +import type { ChartDataConfigObject } from './AreaChart'; const renderTitle = (title: string) => { const currentTitle: ChartDataConfigObject = { diff --git a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx index 596172a8f3..154a1a8687 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx @@ -1,6 +1,6 @@ import useTheme from '@mui/material/styles/useTheme'; // @ts-expect-error -- import error, but this type work property -import { ContentRenderer } from 'recharts'; +import type { ContentRenderer } from 'recharts'; import formatDate from '../lib/formatDate'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx b/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx index 67775b3f45..cf4e9c602f 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx @@ -1,4 +1,4 @@ -import { FC, useEffect } from 'react'; +import { type FC, useEffect } from 'react'; import { Navigation } from 'swiper/modules'; import { Swiper, SwiperSlide } from 'swiper/react'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx index 382c1f4b1a..0a8e17c1b3 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx @@ -1,4 +1,4 @@ -import { FC, Fragment } from 'react'; +import { type FC, Fragment } from 'react'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; @@ -11,7 +11,7 @@ import { CartesianGrid, ResponsiveContainer, Tooltip, - TooltipProps, + type TooltipProps, XAxis, YAxis, } from 'recharts'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx index 032683a1fb..8bb138b157 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx @@ -6,7 +6,7 @@ import dayjs from 'dayjs'; import useChartParamsStore, { TIME_PERIOD_OPTIONS, - TimePeriod, + type TimePeriod, } from '../store/useChartParamsStore'; export const StyledToggleButtonGroup = styled(ToggleButtonGroup)( diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx index 93dbbd9711..14ea451755 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx index b4ace2d08b..901fbb1d69 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk/src/enums'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; import Box from '@mui/material/Box'; import AbbreviateClipboard from '@/shared/ui/AbbreviateClipboard'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx index aff8549534..887dca2b8f 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx index a3c6d39e3c..55d910c549 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk/src/enums'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; import Typography from '@mui/material/Typography'; import { getNetwork } from '@/shared/lib/networks'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx index bc71c3b905..f89fc8e37a 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; @@ -8,7 +8,7 @@ import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import Loader from '@/shared/ui/Loader'; -import { LeaderboardData } from '../model/leaderboardSchema'; +import type { LeaderboardData } from '../model/leaderboardSchema'; import useDataGrid from '../ui/useDataGrid'; type Props = { diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx index baea7f9a8b..8d14be8764 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx index b451fd8e36..d2ec1162de 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import LaunchIcon from '@mui/icons-material/Launch'; import Box from '@mui/material/Box'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx index 555c9a8b3a..d8972b9e45 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx @@ -5,7 +5,7 @@ import CircularProgress from '@mui/material/CircularProgress'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; +import Select, { type SelectChangeEvent } from '@mui/material/Select'; import useFilteredNetworks from '@/shared/api/useFilteredNetworks'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx index a3f78f9ebf..49e650b8c3 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx index f2e2f630f2..1f9930e059 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx @@ -3,12 +3,12 @@ import { useMemo } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; +import type { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import CustomTooltip from '@/shared/ui/CustomTooltip'; -import { LeaderboardData } from '../model/leaderboardSchema'; +import type { LeaderboardData } from '../model/leaderboardSchema'; import useLeaderboardFiltersStore from '../store/useLeaderboardFiltersStore'; import AddressCell from './AddressCell'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx index c418b05497..ef1550aa55 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import Card from '@mui/material/Card'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx index 5270129696..8f8318f455 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Chip from '@mui/material/Chip'; import Stack from '@mui/material/Stack'; @@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { AddressDetailsEscrow } from '../model/addressDetailsSchema'; +import type { AddressDetailsEscrow } from '../model/addressDetailsSchema'; import HmtBalance from './HmtBalance'; import TitleSectionWrapper from './TitleSectionWrapper'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx index 0d9d00c134..fab1fbc99c 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx index af44e069b5..4054a82cf9 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import { Role } from '@human-protocol/sdk/src/constants'; import Box from '@mui/material/Box'; @@ -13,7 +13,7 @@ import { env } from '@/shared/config/env'; import EntityIcon from '@/shared/ui/EntityIcon'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { AddressDetailsOperator } from '../model/addressDetailsSchema'; +import type { AddressDetailsOperator } from '../model/addressDetailsSchema'; import HmtBalance from './HmtBalance'; import HmtPrice from './HmtPrice'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx index 02c973e230..dae7cbd7ea 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Table from '@mui/material/Table'; import TableContainer from '@mui/material/TableContainer'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx index e351ccb48b..bb34c6301c 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import CircularProgress from '@mui/material/CircularProgress'; import Link from '@mui/material/Link'; @@ -9,7 +9,7 @@ import TableRow from '@mui/material/TableRow'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import useGlobalFiltersStore from '@/shared/store/useGlobalFiltersStore'; -import { PaginatedEscrowDetails } from '../../model/escrowDetailsSchema'; +import type { PaginatedEscrowDetails } from '../../model/escrowDetailsSchema'; import EscrowsTableBodyContainer from './EscrowsTableBodyContainer'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx index fe7f2c329e..9f85086590 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Grid from '@mui/material/Grid'; import MuiTableBody from '@mui/material/TableBody'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx index add33f3c01..c6a1b8d0db 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx @@ -1,7 +1,7 @@ import Chip from '@mui/material/Chip'; import useTheme from '@mui/material/styles/useTheme'; -import { Reputation } from '@/shared/model/reputationSchema'; +import type { Reputation } from '@/shared/model/reputationSchema'; type Props = { reputation: Reputation; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx index dafe56181c..ff88b6637e 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx @@ -13,7 +13,7 @@ import Loader from '@/shared/ui/Loader'; import ShadowIcon from '@/shared/ui/ShadowIcon'; import useAddressDetails from '../api/useAddressDetails'; -import { AddressDetails } from '../model/addressDetailsSchema'; +import type { AddressDetails } from '../model/addressDetailsSchema'; import Clipboard from './Clipboard'; import EscrowAddress from './EscrowAddress'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx index 8731f44cfc..60d7023dbb 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx index 0331272779..8a35ebfa92 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx @@ -1,4 +1,4 @@ -import { FC, useEffect } from 'react'; +import { type FC, useEffect } from 'react'; import MuiTablePagination from '@mui/material/TablePagination'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx index 68f7378b2a..a7fc5ad517 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx @@ -1,9 +1,9 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; -import { SxProps } from '@mui/material/styles'; +import type { SxProps } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import CustomTooltip from '@/shared/ui/CustomTooltip'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx index 8d57079fb1..ae097a4229 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx index bc74edf214..254e6fecac 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx @@ -1,11 +1,11 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { +import type { AddressDetailsOperator, AddressDetailsWallet, } from '../model/addressDetailsSchema'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx index 992eeef6f6..f39de49cd3 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import AddCircleIcon from '@mui/icons-material/AddCircle'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; @@ -13,7 +13,7 @@ import TableRow from '@mui/material/TableRow'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import AbbreviateClipboard from '@/shared/ui/AbbreviateClipboard'; -import { PaginatedTransactionDetails } from '../../model/transactionDetailsSchema'; +import type { PaginatedTransactionDetails } from '../../model/transactionDetailsSchema'; import TransactionsTableBodyContainer from './TransactionsTableBodyContainer'; import TransactionsTableCellMethod from './TransactionsTableCellMethod'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx index 133bb36a0f..97e6abc3d2 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Grid from '@mui/material/Grid'; import MuiTableBody from '@mui/material/TableBody'; diff --git a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx index fb32ad217a..3e2e5fe8c9 100644 --- a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx +++ b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; diff --git a/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx b/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx index 2858ae7b4d..53a22f2412 100644 --- a/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; import Box from '@mui/material/Box'; diff --git a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx index 23da9e43ee..f3e59903f6 100644 --- a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx @@ -1,4 +1,4 @@ -import Tooltip, { TooltipProps } from '@mui/material/Tooltip'; +import Tooltip, { type TooltipProps } from '@mui/material/Tooltip'; const CustomTooltip = (props: TooltipProps) => { return ; diff --git a/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx b/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx index 1ec5ff700f..92c6743952 100644 --- a/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx @@ -1,14 +1,14 @@ -import { Dispatch, SetStateAction, useState } from 'react'; +import { type Dispatch, type SetStateAction, useState } from 'react'; import Typography from '@mui/material/Typography'; import { - DatePickerProps, + type DatePickerProps, LocalizationProvider, - UseDateFieldProps, + type UseDateFieldProps, } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { DatePicker as DatePickerMui } from '@mui/x-date-pickers/DatePicker'; -import { +import type { BaseSingleInputFieldProps, DateValidationError, FieldSection, diff --git a/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx b/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx index 43f4a848dd..2adf29fd5d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import { NumericFormat } from 'react-number-format'; diff --git a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx index c7f06e9d66..ec953056ea 100644 --- a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx @@ -1,4 +1,4 @@ -import { ChainId } from '@human-protocol/sdk/src/enums'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; import BinanceSmartChainIcon from '@/shared/ui/icons/BinanceSmartChainIcon'; import EthereumIcon from '@/shared/ui/icons/EthereumIcon'; diff --git a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx index c78bd66e87..c8dcd6c476 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx @@ -1,4 +1,4 @@ -import { FC, useCallback, useEffect, useState } from 'react'; +import { type FC, useCallback, useEffect, useState } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import SearchIcon from '@mui/icons-material/Search'; @@ -8,7 +8,7 @@ import Grid from '@mui/material/Grid'; import IconButton from '@mui/material/IconButton'; import InputAdornment from '@mui/material/InputAdornment'; import MenuItem from '@mui/material/MenuItem'; -import MuiSelect, { SelectChangeEvent } from '@mui/material/Select'; +import MuiSelect, { type SelectChangeEvent } from '@mui/material/Select'; import useTheme from '@mui/material/styles/useTheme'; import TextField from '@mui/material/TextField'; import { useLocation, useNavigate } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/shared/ui/SearchBar/styles.ts b/packages/apps/dashboard/client/src/shared/ui/SearchBar/styles.ts index b9555739e1..9af4b5adeb 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SearchBar/styles.ts +++ b/packages/apps/dashboard/client/src/shared/ui/SearchBar/styles.ts @@ -1,4 +1,4 @@ -import { Theme } from '@mui/material/styles'; +import type { Theme } from '@mui/material/styles'; export const endAdornmentInputAdornmentSx = { display: 'flex', diff --git a/packages/apps/dashboard/client/src/shared/ui/SectionWrapper/index.tsx b/packages/apps/dashboard/client/src/shared/ui/SectionWrapper/index.tsx index df126af5fe..a666cc20f0 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SectionWrapper/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/SectionWrapper/index.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Card from '@mui/material/Card'; diff --git a/packages/apps/dashboard/client/src/shared/ui/ShadowIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/ShadowIcon/index.tsx index cf79aebfe8..94efb88761 100644 --- a/packages/apps/dashboard/client/src/shared/ui/ShadowIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/ShadowIcon/index.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import clsx from 'clsx'; diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx index 4e99f7ee6a..38f28c8530 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const BinanceSmartChainIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx index 28a6d6d5f2..43ab1e5ba5 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const DarkModeIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx index 459685c6d5..6556f5b50d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx @@ -1,8 +1,8 @@ -import React from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; -const DiscordIcon: React.FC = (props) => { +const DiscordIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx index fe065f746d..8dea2f7832 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const EscrowAddressIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx index 61e39522cf..933282013d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const EthereumIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx index f4fd72d70d..aaf2f8bcd0 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const ExchangeOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx index 90581b56c1..d535dcb3d2 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const HumanIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx index 80a004766f..eba393aa89 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const JobLauncherIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx index 585a217543..6dc2e1e874 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LeaderboardIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx index 5e8866c7f8..ba6afb627d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LightModeIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx index ea6291608a..c307d86781 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LogoBlockIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx index 1fdf5e9d2c..8f1a645479 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LogoBlockIconMobile: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx index 0eb1c1ef40..d37c41c1b1 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const PolygonIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx index a3f305dc62..b972cd92ad 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const RecordingOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx index 67639b7fca..651067c91e 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const ReputationOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx index d8f159c4fa..37dc85f7e0 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const WalletIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx b/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx index 938ea96dfb..d010336abe 100644 --- a/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx @@ -1,11 +1,11 @@ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; -import { +import type { PaletteColorOptions, PaletteColor, } from '@mui/material/styles/createPalette'; import createTheme from '@mui/material/styles/createTheme'; -import { Shadows } from '@mui/material/styles/shadows'; +import type { Shadows } from '@mui/material/styles/shadows'; import { lightPalette, darkPalette } from './palette'; diff --git a/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx b/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx index 1a7be1c28c..6eae04234f 100644 --- a/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx +++ b/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import GitHubIcon from '@mui/icons-material/GitHub'; import LinkedInIcon from '@mui/icons-material/LinkedIn'; diff --git a/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx b/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx index b44852fce9..d3ca5743c7 100644 --- a/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx +++ b/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import MenuIcon from '@mui/icons-material/Menu'; diff --git a/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx b/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx index 82ba0c3d7c..0ac478ac59 100644 --- a/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx +++ b/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import IconButton from '@mui/material/IconButton'; import useTheme from '@mui/material/styles/useTheme'; diff --git a/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx b/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx index e4096036c4..8ecc2a85d1 100644 --- a/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx +++ b/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import clsx from 'clsx';