From 45ebe6587751daa7c7b8b393407944dc2cd93055 Mon Sep 17 00:00:00 2001 From: kirill Date: Mon, 2 Jun 2025 17:10:14 +0300 Subject: [PATCH 1/8] refacor: using modern flat eslint config, add some rules, change a pattern for import paths --- packages/apps/dashboard/client/.eslintrc.cjs | 19 ---- .../apps/dashboard/client/eslint.config.js | 98 +++++++++++++++++++ packages/apps/dashboard/client/package.json | 11 ++- packages/apps/dashboard/client/src/App.tsx | 8 +- .../components/Breadcrumbs/Breadcrumbs.tsx | 7 +- .../src/components/Charts/AreaChart.tsx | 16 +-- .../components/Charts/CustomChartTooltip.tsx | 6 +- .../src/components/Charts/CustomXAxisTick.tsx | 4 +- .../src/components/Charts/ToggleCharts.tsx | 2 +- .../src/components/Clipboard/Clipboard.tsx | 2 +- .../src/components/DataEntry/DatePicker.tsx | 2 +- .../components/DataEntry/ToggleButtons.tsx | 2 +- .../client/src/components/Footer/Footer.tsx | 4 +- .../client/src/components/Header/Header.tsx | 6 +- .../src/components/Home/GraphSwiper.tsx | 9 +- .../client/src/components/Home/SmallGraph.tsx | 10 +- .../src/components/NetworkIcon/index.tsx | 18 ++-- .../components/NothingFound/NothingFound.tsx | 2 +- .../components/PageWrapper/PageWrapper.tsx | 4 +- .../components/SearchBar/SearchBar.styles.ts | 2 +- .../src/components/SearchBar/SearchBar.tsx | 10 +- .../SearchResults/AbbreviateClipboard.tsx | 6 +- .../SearchResults/TitleSectionWrapper.tsx | 2 +- .../Leaderboard/components/AddressCell.tsx | 2 +- .../Leaderboard/components/ChainCell.tsx | 4 +- .../components/DataGridWrapper.tsx | 10 +- .../Leaderboard/components/EntityIcon.tsx | 10 +- .../Leaderboard/components/RoleCell.tsx | 4 +- .../Leaderboard/components/SelectNetwork.tsx | 8 +- .../Leaderboard/hooks/useDataGrid.tsx | 9 +- .../client/src/features/Leaderboard/index.tsx | 4 +- packages/apps/dashboard/client/src/main.tsx | 2 +- .../client/src/pages/Graph/Graph.tsx | 11 +-- .../client/src/pages/Home/Holders.tsx | 4 +- .../dashboard/client/src/pages/Home/Home.tsx | 22 ++--- .../client/src/pages/Home/Leaderboard.tsx | 2 +- .../src/pages/Home/TotalNumberOfTasks.tsx | 4 +- .../src/pages/Home/TotalTransactions.tsx | 4 +- .../client/src/pages/Leaderboard/index.tsx | 10 +- .../EscrowAddress/EscrowAddress.tsx | 6 +- .../pages/SearchResults/HmtBalance/index.tsx | 4 +- .../pages/SearchResults/HmtPrice/index.tsx | 2 +- .../src/pages/SearchResults/KVStore/index.tsx | 4 +- .../SearchResults/ReputationScore/index.tsx | 4 +- .../SearchResults/RoleDetails/RoleDetails.tsx | 20 ++-- .../RoleDetailsEscrowsTable.tsx | 8 +- .../tableComponents/EscrowsTableBody.tsx | 12 +-- .../src/pages/SearchResults/SearchResults.tsx | 32 +++--- .../pages/SearchResults/StakeInfo/index.tsx | 4 +- .../WalletAddress/WalletAddress.tsx | 8 +- .../WalletAddressTransactionsTable.tsx | 10 +- .../cells/TransactionTableCellMethod.tsx | 2 +- .../cells/TransactionTableCellValue.tsx | 4 +- .../tableComponents/TransactionsTableBody.tsx | 18 ++-- .../tableComponents/TransactionsTableHead.tsx | 2 +- .../client/src/services/api-paths.ts | 2 +- .../src/services/api/use-address-details.tsx | 4 +- .../src/services/api/use-escrows-details.tsx | 8 +- .../src/services/api/use-general-stats.tsx | 2 +- .../api/use-graph-page-chart-data.tsx | 4 +- .../api/use-hcaptcha-general-stats.tsx | 6 +- .../client/src/services/api/use-hmt-price.tsx | 2 +- .../src/services/api/use-kvstore-data.tsx | 8 +- .../services/api/use-leaderboard-details.tsx | 5 +- .../services/api/use-transaction-details.tsx | 6 +- .../client/src/services/validate-response.ts | 2 +- packages/apps/dashboard/client/src/theme.tsx | 4 +- .../client/src/utils/config/networks.ts | 2 +- .../src/utils/hooks/use-filtered-networks.ts | 6 +- packages/apps/dashboard/client/tsconfig.json | 12 +-- packages/apps/dashboard/client/vite.config.ts | 8 +- 71 files changed, 327 insertions(+), 254 deletions(-) delete mode 100644 packages/apps/dashboard/client/.eslintrc.cjs create mode 100644 packages/apps/dashboard/client/eslint.config.js diff --git a/packages/apps/dashboard/client/.eslintrc.cjs b/packages/apps/dashboard/client/.eslintrc.cjs deleted file mode 100644 index 071a19765f..0000000000 --- a/packages/apps/dashboard/client/.eslintrc.cjs +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - 'plugin:react-hooks/recommended', - ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - plugins: ['react-refresh'], - rules: { - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], - }, -}; diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js new file mode 100644 index 0000000000..f9231cd4a2 --- /dev/null +++ b/packages/apps/dashboard/client/eslint.config.js @@ -0,0 +1,98 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import reactPlugin from 'eslint-plugin-react'; +import reactHooksPlugin from 'eslint-plugin-react-hooks'; +import prettierPlugin from 'eslint-plugin-prettier'; +import importPlugin from 'eslint-plugin-import'; +import globals from 'globals'; + +export default [ + { + ignores: ['dist/**', 'node_modules/**'], + }, + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + files: ['**/*.ts', '**/*.tsx'], + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + parser: tseslint.parser, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + ...globals.browser, + ...globals.es2022, + }, + }, + plugins: { + react: reactPlugin, + 'react-hooks': reactHooksPlugin, + prettier: prettierPlugin, + import: importPlugin, + }, + settings: { + react: { + version: 'detect', + }, + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + }, + }, + }, + rules: { + 'react/prop-types': 'off', + 'react/display-name': 'off', + 'react/react-in-jsx-scope': 'off', + 'react-hooks/exhaustive-deps': 'warn', + 'react-hooks/rules-of-hooks': 'error', + // 'import/order': [ + // 'error', + // { + // 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], + // 'pathGroups': [ + // { + // 'pattern': 'react', + // 'group': 'external', + // 'position': 'before' + // } + // ], + // 'pathGroupsExcludedImportTypes': ['react'], + // 'newlines-between': 'always', + // 'alphabetize': { + // 'order': 'asc', + // 'caseInsensitive': true + // } + // } + // ], + 'import/no-duplicates': 'error', + 'import/no-unresolved': 'error', + '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], + '@typescript-eslint/no-explicit-any': 'error', + 'no-console': ['error', { allow: ['warn', 'error'] }], + quotes: [ + 'error', + 'single', + { + avoidEscape: true, + }, + ], + 'no-restricted-imports': [ + 'error', + { + paths: [ + { + name: 'lodash', + message: + 'Please import only specific modules from lodash to reduce bundle size. Instead of import {compact} from `lodash`, import compact from lodash/compact', + }, + ], + }, + ], + }, + } +]; diff --git a/packages/apps/dashboard/client/package.json b/packages/apps/dashboard/client/package.json index 90e9fa80b2..788ac2d53d 100644 --- a/packages/apps/dashboard/client/package.json +++ b/packages/apps/dashboard/client/package.json @@ -9,7 +9,8 @@ "clean": "tsc --build --clean && rm -rf dist", "start": "vite", "build": "tsc --build && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --report-unused-disable-directives --max-warnings 0", + "lint:fix": "eslint . --fix", "preview": "vite preview", "vercel-build": "yarn workspace human-protocol build:libs && yarn build", "test": "exit 0" @@ -44,17 +45,23 @@ "zustand": "^4.5.4" }, "devDependencies": { + "@eslint/js": "^9.27.0", "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.57.0", - "eslint-plugin-react-hooks": "^5.1.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-prettier": "^5.4.0", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-refresh": "^0.4.11", + "globals": "^16.2.0", "prettier": "^3.4.2", "sass": "^1.85.0", "typescript": "^5.6.3", + "typescript-eslint": "^8.33.0", "vite": "^6.2.4", "vite-plugin-svgr": "^4.2.0" } diff --git a/packages/apps/dashboard/client/src/App.tsx b/packages/apps/dashboard/client/src/App.tsx index fd00554e6d..c78a2f31b6 100644 --- a/packages/apps/dashboard/client/src/App.tsx +++ b/packages/apps/dashboard/client/src/App.tsx @@ -2,10 +2,10 @@ import { FC } from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; -import Graph from '@pages/Graph'; -import Home from '@pages/Home'; -import LeaderBoard from '@pages/Leaderboard'; -import SearchResults from '@pages/SearchResults'; +import Graph from '@/pages/Graph'; +import Home from '@/pages/Home'; +import LeaderBoard from '@/pages/Leaderboard'; +import SearchResults from '@/pages/SearchResults'; const App: FC = () => { return ( diff --git a/packages/apps/dashboard/client/src/components/Breadcrumbs/Breadcrumbs.tsx b/packages/apps/dashboard/client/src/components/Breadcrumbs/Breadcrumbs.tsx index 8505e7439c..2858ae7b4d 100644 --- a/packages/apps/dashboard/client/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/packages/apps/dashboard/client/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -1,11 +1,10 @@ import { FC } from 'react'; -import { Link as RouterLink } from 'react-router-dom'; -import Link from '@mui/material/Link'; +import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; import Box from '@mui/material/Box'; +import Link from '@mui/material/Link'; import Typography from '@mui/material/Typography'; - -import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; +import { Link as RouterLink } from 'react-router-dom'; const Breadcrumbs: FC<{ title?: string }> = ({ title }) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx b/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx index 990e9cabbe..900cc36c0e 100644 --- a/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx @@ -12,21 +12,21 @@ import { useEffect, useRef, useState } from 'react'; import Card from '@mui/material/Card'; import { Typography } from '@mui/material'; import Stack from '@mui/material/Stack'; -import { colorPalette } from '@assets/styles/color-palette'; -import CustomXAxisTick from '@components/Charts/CustomXAxisTick'; -import DatePicker from '@components/DataEntry/DatePicker'; -import ToggleButtons from '@components/DataEntry/ToggleButtons'; +import { colorPalette } from '@/assets/styles/color-palette'; +import CustomXAxisTick from '@/components/Charts/CustomXAxisTick'; +import DatePicker from '@/components/DataEntry/DatePicker'; +import ToggleButtons from '@/components/DataEntry/ToggleButtons'; import dayjs, { Dayjs } from 'dayjs'; -import ToggleCharts from '@components/Charts/ToggleCharts'; -import { formatNumber } from '@helpers/formatNumber'; +import ToggleCharts from '@/components/Charts/ToggleCharts'; +import { formatNumber } from '@/helpers/formatNumber'; import { GraphPageChartData, useGraphPageChartData, -} from '@services/api/use-graph-page-chart-data'; +} from '@/services/api/use-graph-page-chart-data'; import { initialAllTime, useGraphPageChartParams, -} from '@utils/hooks/use-graph-page-chart-params'; +} from '@/utils/hooks/use-graph-page-chart-params'; export type GraphPageChartDataConfigObject = Partial< Record diff --git a/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx b/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx index ccca5b6c96..f2dc987085 100644 --- a/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx @@ -4,9 +4,9 @@ import Box from '@mui/material/Box'; import { Grid, Typography } from '@mui/material'; import Stack from '@mui/material/Stack'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; -import { colorPalette } from '@assets/styles/color-palette'; -import { formatDate } from '@helpers/formatDate'; -import { GraphPageChartDataConfigObject } from '@components/Charts/AreaChart'; +import { colorPalette } from '@/assets/styles/color-palette'; +import { formatDate } from '@/helpers/formatDate'; +import { GraphPageChartDataConfigObject } from '@/components/Charts/AreaChart'; import { NumericFormat } from 'react-number-format'; const renderTitle = (title: string) => { diff --git a/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx b/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx index 364f711fe6..749f7a142d 100644 --- a/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx @@ -1,7 +1,7 @@ -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; // @ts-expect-error -- import error, but this type work property import { ContentRenderer } from 'recharts'; -import { formatDate } from '@helpers/formatDate'; +import { formatDate } from '@/helpers/formatDate'; const CustomXAxisTick = ({ x, y, payload }: ContentRenderer) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx b/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx index bb040ec562..7c0a9541bf 100644 --- a/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx @@ -1,7 +1,7 @@ import { FormControlLabel, FormGroup, Typography } from '@mui/material'; import Stack from '@mui/material/Stack'; import Checkbox from '@mui/material/Checkbox'; -import { FormatNumber } from '@components/Home/FormatNumber'; +import { FormatNumber } from '@/components/Home/FormatNumber'; interface ToggleChartsProps { handleChange: (event: React.ChangeEvent) => void; diff --git a/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx b/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx index 967c27340e..aaead34bdc 100644 --- a/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx +++ b/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx @@ -5,7 +5,7 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import IconButton from '@mui/material/IconButton'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import CustomTooltip from '@components/CustomTooltip'; +import CustomTooltip from '@/components/CustomTooltip'; interface ClipboardProps { value: string; diff --git a/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx b/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx index a53e3d65f1..69b21c5543 100644 --- a/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx +++ b/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx @@ -13,7 +13,7 @@ import { DateValidationError, FieldSection, } from '@mui/x-date-pickers/models'; -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; interface CustomDateFieldProps extends UseDateFieldProps, diff --git a/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx b/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx index 88da0dd274..36f134831e 100644 --- a/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx +++ b/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx @@ -6,7 +6,7 @@ import { TIME_PERIOD_OPTIONS, TimePeriod, useGraphPageChartParams, -} from '@utils/hooks/use-graph-page-chart-params'; +} from '@/utils/hooks/use-graph-page-chart-params'; import dayjs from 'dayjs'; export const StyledToggleButtonGroup = styled(ToggleButtonGroup)( diff --git a/packages/apps/dashboard/client/src/components/Footer/Footer.tsx b/packages/apps/dashboard/client/src/components/Footer/Footer.tsx index 31e4281a67..4873cc440a 100644 --- a/packages/apps/dashboard/client/src/components/Footer/Footer.tsx +++ b/packages/apps/dashboard/client/src/components/Footer/Footer.tsx @@ -9,8 +9,8 @@ import LinkedInIcon from '@mui/icons-material/LinkedIn'; import GitHubIcon from '@mui/icons-material/GitHub'; import TelegramIcon from '@mui/icons-material/Telegram'; -import DiscordIcon from '@components/Icons/DiscordIcon'; -import { env } from '@helpers/env'; +import DiscordIcon from '@/components/Icons/DiscordIcon'; +import { env } from '@/helpers/env'; const StyledLink = styled(Link)(({ theme }) => ({ textDecoration: 'none', diff --git a/packages/apps/dashboard/client/src/components/Header/Header.tsx b/packages/apps/dashboard/client/src/components/Header/Header.tsx index b323190c2d..0e4a7da660 100644 --- a/packages/apps/dashboard/client/src/components/Header/Header.tsx +++ b/packages/apps/dashboard/client/src/components/Header/Header.tsx @@ -12,9 +12,9 @@ import Toolbar from '@mui/material/Toolbar'; import styled from '@mui/material/styles/styled'; import { Link } from 'react-router-dom'; -import { LogoBlockIcon } from '@components/Icons/LogoBlockIcon'; -import { LogoBlockIconMobile } from '@components/Icons/LogoBlockIconMobile'; -import { env } from '@helpers/env'; +import { LogoBlockIcon } from '@/components/Icons/LogoBlockIcon'; +import { LogoBlockIconMobile } from '@/components/Icons/LogoBlockIconMobile'; +import { env } from '@/helpers/env'; const NavLink = styled(MuiLink)(({ theme }) => ({ color: theme.palette.primary.main, diff --git a/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx b/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx index 88efa002bd..1c62b8e00d 100644 --- a/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx +++ b/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx @@ -1,10 +1,10 @@ import { Navigation } from 'swiper/modules'; import { Swiper, SwiperSlide } from 'swiper/react'; -import SmallGraph from '@components/Home/SmallGraph'; +import SmallGraph from '@/components/Home/SmallGraph'; import 'swiper/css'; import 'swiper/css/navigation'; -import { useGraphPageChartData } from '@services/api/use-graph-page-chart-data'; -import { useGraphPageChartParams } from '@utils/hooks/use-graph-page-chart-params'; +import { useGraphPageChartData } from '@/services/api/use-graph-page-chart-data'; +import { useGraphPageChartParams } from '@/utils/hooks/use-graph-page-chart-params'; import { useEffect } from 'react'; const GraphSwiper = () => { @@ -13,8 +13,7 @@ const GraphSwiper = () => { useEffect(() => { revertToInitialParams(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [revertToInitialParams]); const transactionHistoryData = (data || []).map( ({ totalTransactionCount, date }) => ({ diff --git a/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx b/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx index 18c3af1b8f..94d9b1762b 100644 --- a/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx +++ b/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx @@ -13,13 +13,13 @@ import { import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; -import ToggleButtons from '@components/DataEntry/ToggleButtons'; +import ToggleButtons from '@/components/DataEntry/ToggleButtons'; import Typography from '@mui/material/Typography'; -import { colorPalette } from '@assets/styles/color-palette'; -import { formatDate } from '@helpers/formatDate'; -import { formatNumber } from '@helpers/formatNumber'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +import { colorPalette } from '@/assets/styles/color-palette'; +import { formatDate } from '@/helpers/formatDate'; +import { formatNumber } from '@/helpers/formatNumber'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; const CustomSmallChartTooltip = ({ payload, diff --git a/packages/apps/dashboard/client/src/components/NetworkIcon/index.tsx b/packages/apps/dashboard/client/src/components/NetworkIcon/index.tsx index 583bebae24..2953bc894f 100644 --- a/packages/apps/dashboard/client/src/components/NetworkIcon/index.tsx +++ b/packages/apps/dashboard/client/src/components/NetworkIcon/index.tsx @@ -1,12 +1,12 @@ -import EthereumIcon from '@components/Icons/EthereumIcon'; -import BinanceSmartChainIcon from '@components/Icons/BinanceSmartChainIcon'; -import PolygonIcon from '@components/Icons/PolygonIcon'; -import MoonbeamIcon from '@components/Icons/MoonbeamIcon'; -import MoonbaseAlphaIcon from '@components/Icons/MoonbaseAlphaIcon'; -import CeloIcon from '@assets/icons/celo.svg'; -import { XLayerIcon } from '@components/Icons/XLayerIcon'; -import HumanIcon from '@components/Icons/HumanIcon'; -import { AvalancheIcon } from '@components/Icons/AvalancheIcon'; +import EthereumIcon from '@/components/Icons/EthereumIcon'; +import BinanceSmartChainIcon from '@/components/Icons/BinanceSmartChainIcon'; +import PolygonIcon from '@/components/Icons/PolygonIcon'; +import MoonbeamIcon from '@/components/Icons/MoonbeamIcon'; +import MoonbaseAlphaIcon from '@/components/Icons/MoonbaseAlphaIcon'; +import CeloIcon from '@/assets/icons/celo.svg'; +import { XLayerIcon } from '@/components/Icons/XLayerIcon'; +import HumanIcon from '@/components/Icons/HumanIcon'; +import { AvalancheIcon } from '@/components/Icons/AvalancheIcon'; export const NetworkIcon = ({ chainId }: { chainId: number }) => { const icon = (() => { diff --git a/packages/apps/dashboard/client/src/components/NothingFound/NothingFound.tsx b/packages/apps/dashboard/client/src/components/NothingFound/NothingFound.tsx index 39162a97e4..724fe89541 100644 --- a/packages/apps/dashboard/client/src/components/NothingFound/NothingFound.tsx +++ b/packages/apps/dashboard/client/src/components/NothingFound/NothingFound.tsx @@ -8,7 +8,7 @@ const NothingFound: FC = () => { <> Nothing found :( - We couldn't find anything within this criteria. + We couldn't find anything within this criteria.
Please search by wallet address or escrow address.
diff --git a/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx b/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx index 9ae5b905a8..85f4b225a3 100644 --- a/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx +++ b/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx @@ -1,7 +1,7 @@ import { FC, PropsWithChildren } from 'react'; import clsx from 'clsx'; -import Header from '@components/Header'; -import Footer from '@components/Footer'; +import Header from '@/components/Header'; +import Footer from '@/components/Footer'; const PageWrapper: FC< PropsWithChildren<{ diff --git a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.styles.ts b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.styles.ts index 20a24ae2c5..3812d346f4 100644 --- a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.styles.ts +++ b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.styles.ts @@ -1,4 +1,4 @@ -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; export const endAdornmentInputAdornmentSx = { display: 'flex', diff --git a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx index b57d3b7b28..6c6a4a6666 100644 --- a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx +++ b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx @@ -15,11 +15,11 @@ import { Tooltip, CircularProgress, } from '@mui/material'; -import { colorPalette } from '@assets/styles/color-palette'; -import { useFilteredNetworks } from '@utils/hooks/use-filtered-networks'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; -import { NetworkIcon } from '@components/NetworkIcon'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; +import { colorPalette } from '@/assets/styles/color-palette'; +import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { NetworkIcon } from '@/components/NetworkIcon'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; import { endAdornmentInputAdornmentSx, startAdornmentInputAdornmentSx, diff --git a/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx b/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx index 3ca2e6ce56..a64f7edabb 100644 --- a/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx +++ b/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx @@ -1,13 +1,13 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import abbreviateValue from '@helpers/abbreviateValue'; +import abbreviateValue from '@/helpers/abbreviateValue'; import IconButton from '@mui/material/IconButton'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; import { Link } from '@mui/material'; import { useNavigate } from 'react-router-dom'; import { useState } from 'react'; -import CustomTooltip from '@components/CustomTooltip'; +import CustomTooltip from '@/components/CustomTooltip'; interface AbbreviateClipboardProps { value: string; diff --git a/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx b/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx index dd8bbf8d8e..66edc415e5 100644 --- a/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx +++ b/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx @@ -6,7 +6,7 @@ import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Typography from '@mui/material/Typography'; import { SxProps } from '@mui/material'; -import CustomTooltip from '@components/CustomTooltip'; +import CustomTooltip from '@/components/CustomTooltip'; type Props = { title: string; diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx index bfaa2633be..74f36c4454 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx @@ -1,4 +1,4 @@ -import AbbreviateClipboard from '@components/SearchResults/AbbreviateClipboard'; +import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; import { Box } from '@mui/material'; export const AddressCell = ({ diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx index e341f5b7ba..af0178d8b6 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx @@ -1,6 +1,6 @@ import { Typography } from '@mui/material'; -import { NetworkIcon } from '@components/NetworkIcon'; -import { getNetwork } from '@utils/config/networks'; +import { NetworkIcon } from '@/components/NetworkIcon'; +import { getNetwork } from '@/utils/config/networks'; export const ChainCell = ({ chainId }: { chainId: number }) => ( = ({ role }) => { diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx index 3fb3e6b34f..0a2a855aa7 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx @@ -1,9 +1,9 @@ import { Box, Typography } from '@mui/material'; import { Launch as LaunchIcon } from '@mui/icons-material'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; import { Link } from 'react-router-dom'; import { EntityIcon } from './EntityIcon'; -import { CaseConverter } from '@utils/case-converter'; +import { CaseConverter } from '@/utils/case-converter'; const Wrapper = ({ children, diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx index 8ce48e5d04..2085c7960f 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx @@ -3,10 +3,10 @@ import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; import Box from '@mui/material/Box'; -import { useLeaderboardSearch } from '@utils/hooks/use-leaderboard-search'; -import { useFilteredNetworks } from '@utils/hooks/use-filtered-networks'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; -import { NetworkIcon } from '@components/NetworkIcon'; +import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; +import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { NetworkIcon } from '@/components/NetworkIcon'; import CircularProgress from '@mui/material/CircularProgress'; import { useEffect } from 'react'; diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx index 6480ae130b..3024a545d4 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx @@ -4,7 +4,7 @@ import { Box, Typography } from '@mui/material'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; -import CustomTooltip from '@components/CustomTooltip'; +import CustomTooltip from '@/components/CustomTooltip'; import { RoleCell } from '../components/RoleCell'; import { AddressCell } from '../components/AddressCell'; import { ChainCell } from '../components/ChainCell'; @@ -12,11 +12,10 @@ import { SelectNetwork } from '../components/SelectNetwork'; import { TextCell } from '../components/TextCell'; import { CategoryCell } from '../components/CategoryCell'; -import { LeaderBoardData } from '@services/api/use-leaderboard-details'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; -import { useLeaderboardSearch } from '@utils/hooks/use-leaderboard-search'; +import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; -// eslint-disable-next-line react-refresh/only-export-components const InfoTooltip = ({ title }: { title: string }) => ( { const { revertToInitialParams } = useGraphPageChartParams(); useEffect(() => { revertToInitialParams(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [revertToInitialParams]); return ( diff --git a/packages/apps/dashboard/client/src/pages/Home/Holders.tsx b/packages/apps/dashboard/client/src/pages/Home/Holders.tsx index d25feb93b3..0fc3d025f8 100644 --- a/packages/apps/dashboard/client/src/pages/Home/Holders.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/Holders.tsx @@ -1,8 +1,8 @@ import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import { FormatNumber } from '@components/Home/FormatNumber'; -import { useGeneralStats } from '@services/api/use-general-stats'; +import { FormatNumber } from '@/components/Home/FormatNumber'; +import { useGeneralStats } from '@/services/api/use-general-stats'; const Holders = () => { const { data, isSuccess, isPending, isError } = useGeneralStats(); diff --git a/packages/apps/dashboard/client/src/pages/Home/Home.tsx b/packages/apps/dashboard/client/src/pages/Home/Home.tsx index 73e16c028a..188280c2bf 100644 --- a/packages/apps/dashboard/client/src/pages/Home/Home.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/Home.tsx @@ -9,19 +9,19 @@ import Typography from '@mui/material/Typography'; import { Link } from 'react-router-dom'; import styled from '@mui/material/styles/styled'; -import PageWrapper from '@components/PageWrapper'; -import SearchBar from '@components/SearchBar/SearchBar'; -import ShadowIcon from '@components/ShadowIcon'; +import PageWrapper from '@/components/PageWrapper'; +import SearchBar from '@/components/SearchBar/SearchBar'; +import ShadowIcon from '@/components/ShadowIcon'; import { Leaderboard } from './Leaderboard'; -import GraphSwiper from '@components/Home/GraphSwiper'; -import HMTPrice from '@pages/Home/HMTPrice'; -import TotalNumberOfTasks from '@pages/Home/TotalNumberOfTasks'; -import Holders from '@pages/Home/Holders'; -import TotalTransactions from '@pages/Home/TotalTransactions'; -import { LeaderboardIcon } from '@components/Icons/LeaderboardIcon'; -import CustomTooltip from '@components/CustomTooltip'; +import GraphSwiper from '@/components/Home/GraphSwiper'; +import HMTPrice from '@/pages/Home/HMTPrice'; +import TotalNumberOfTasks from '@/pages/Home/TotalNumberOfTasks'; +import Holders from '@/pages/Home/Holders'; +import TotalTransactions from '@/pages/Home/TotalTransactions'; +import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; +import CustomTooltip from '@/components/CustomTooltip'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; const CardWrapper = styled(Grid)(({ theme }) => ({ display: 'flex', diff --git a/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx b/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx index 532e9788ff..490d46c857 100644 --- a/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx @@ -1,4 +1,4 @@ -import { useLeaderboardDetails } from '@services/api/use-leaderboard-details'; +import { useLeaderboardDetails } from '@/services/api/use-leaderboard-details'; import { Leaderboard as LeaderboardFeature } from '../../features/Leaderboard'; export const Leaderboard = () => { diff --git a/packages/apps/dashboard/client/src/pages/Home/TotalNumberOfTasks.tsx b/packages/apps/dashboard/client/src/pages/Home/TotalNumberOfTasks.tsx index 3e4c90922e..83783a3a35 100644 --- a/packages/apps/dashboard/client/src/pages/Home/TotalNumberOfTasks.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/TotalNumberOfTasks.tsx @@ -1,8 +1,8 @@ import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import { FormatNumber } from '@components/Home/FormatNumber'; -import { useHcaptchaGeneralStats } from '@services/api/use-hcaptcha-general-stats'; +import { FormatNumber } from '@/components/Home/FormatNumber'; +import { useHcaptchaGeneralStats } from '@/services/api/use-hcaptcha-general-stats'; const TotalNumberOfTasks = () => { const { data, isError, isPending, isSuccess } = useHcaptchaGeneralStats(); diff --git a/packages/apps/dashboard/client/src/pages/Home/TotalTransactions.tsx b/packages/apps/dashboard/client/src/pages/Home/TotalTransactions.tsx index 6c4ada399a..3e2959c3ed 100644 --- a/packages/apps/dashboard/client/src/pages/Home/TotalTransactions.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/TotalTransactions.tsx @@ -1,8 +1,8 @@ import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import { FormatNumber } from '@components/Home/FormatNumber'; -import { useGeneralStats } from '@services/api/use-general-stats'; +import { FormatNumber } from '@/components/Home/FormatNumber'; +import { useGeneralStats } from '@/services/api/use-general-stats'; const TotalTransactions = () => { const { data, isError, isPending, isSuccess } = useGeneralStats(); diff --git a/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx b/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx index 60f93d1732..588dc84758 100644 --- a/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx +++ b/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx @@ -1,9 +1,9 @@ -import Breadcrumbs from '@components/Breadcrumbs'; -import PageWrapper from '@components/PageWrapper'; -import ShadowIcon from '@components/ShadowIcon'; +import Breadcrumbs from '@/components/Breadcrumbs'; +import PageWrapper from '@/components/PageWrapper'; +import ShadowIcon from '@/components/ShadowIcon'; import { Leaderboard } from '../../features/Leaderboard/index'; -import { useLeaderboardDetails } from '@services/api/use-leaderboard-details'; -import { LeaderboardIcon } from '@components/Icons/LeaderboardIcon'; +import { useLeaderboardDetails } from '@/services/api/use-leaderboard-details'; +import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; const LeaderBoard = () => { const { data, status, error } = useLeaderboardDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx index f258eeb751..8642b16b70 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx @@ -2,11 +2,11 @@ import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import TitleSectionWrapper from '@components/SearchResults'; -import SectionWrapper from '@components/SectionWrapper'; +import TitleSectionWrapper from '@/components/SearchResults'; +import SectionWrapper from '@/components/SectionWrapper'; import HmtBalance from '../HmtBalance'; -import { AddressDetailsEscrowSchema } from '@services/api/use-address-details'; +import { AddressDetailsEscrowSchema } from '@/services/api/use-address-details'; const EscrowAddress = ({ data: { diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/HmtBalance/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/HmtBalance/index.tsx index b942cac755..00c25526e7 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/HmtBalance/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/HmtBalance/index.tsx @@ -4,8 +4,8 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { NumericFormat } from 'react-number-format'; -import { useHMTPrice } from '@services/api/use-hmt-price'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +import { useHMTPrice } from '@/services/api/use-hmt-price'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; type Props = { balance?: number | null; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/HmtPrice/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/HmtPrice/index.tsx index 71c97576a8..f32c458493 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/HmtPrice/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/HmtPrice/index.tsx @@ -1,6 +1,6 @@ import { Typography, Stack } from '@mui/material'; -import { useHMTPrice } from '@services/api/use-hmt-price'; +import { useHMTPrice } from '@/services/api/use-hmt-price'; const HmtPrice = () => { const { data, isError, isPending, isSuccess } = useHMTPrice(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx index 3078b19642..fc3d6d460a 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx @@ -7,8 +7,8 @@ import TableCell from '@mui/material/TableCell'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import SectionWrapper from '@components/SectionWrapper'; -import useKvstoreData from '@services/api/use-kvstore-data'; +import SectionWrapper from '@/components/SectionWrapper'; +import useKvstoreData from '@/services/api/use-kvstore-data'; const KVStore = () => { const { data } = useKvstoreData(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx index 7241d36ba9..544d88c263 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx @@ -1,7 +1,7 @@ import { FC } from 'react'; -import { Reputation } from '@services/api/use-leaderboard-details'; -import { colorPalette } from '@assets/styles/color-palette'; +import { Reputation } from '@/services/api/use-leaderboard-details'; +import { colorPalette } from '@/assets/styles/color-palette'; import { Box, Typography } from '@mui/material'; type Props = { diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx index e1215c99c4..7b22106362 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx @@ -7,23 +7,23 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { Role } from '@human-protocol/sdk'; -import SectionWrapper from '@components/SectionWrapper'; -import TitleSectionWrapper from '@components/SearchResults/TitleSectionWrapper'; -import { RoleDetailsEscrowsTable } from '@pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable'; +import SectionWrapper from '@/components/SectionWrapper'; +import TitleSectionWrapper from '@/components/SearchResults/TitleSectionWrapper'; +import { RoleDetailsEscrowsTable } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable'; import KVStore from '../KVStore'; import ReputationScore from '../ReputationScore'; import StakeInfo from '../StakeInfo'; import HmtBalance from '../HmtBalance'; import HmtPrice from '../HmtPrice'; -import ReputationOracleIcon from '@assets/icons/reputation-oracle.svg'; -import ExchangeOracleIcon from '@assets/icons/exchange-oracle.svg'; -import JobLauncherIcon from '@assets/icons/job-launcher.svg'; -import RecordingOracleIcon from '@assets/icons/recording-oracle.svg'; +import ReputationOracleIcon from '@/assets/icons/reputation-oracle.svg'; +import ExchangeOracleIcon from '@/assets/icons/exchange-oracle.svg'; +import JobLauncherIcon from '@/assets/icons/job-launcher.svg'; +import RecordingOracleIcon from '@/assets/icons/recording-oracle.svg'; -import { AddressDetailsOperator } from '@services/api/use-address-details'; -import { env } from '@helpers/env'; -import { colorPalette } from '@assets/styles/color-palette'; +import { AddressDetailsOperator } from '@/services/api/use-address-details'; +import { env } from '@/helpers/env'; +import { colorPalette } from '@/assets/styles/color-palette'; interface RoleInfoProps { title: string; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx index babb913b9f..0a5c7b9cea 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx @@ -8,10 +8,10 @@ import TablePagination from '@mui/material/TablePagination'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import { EscrowsTableBody } from '@pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody'; -import SectionWrapper from '@components/SectionWrapper'; -import { useEscrowDetailsDto } from '@utils/hooks/use-escrows-details-dto'; -import { useEscrowDetails } from '@services/api/use-escrows-details'; +import { EscrowsTableBody } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody'; +import SectionWrapper from '@/components/SectionWrapper'; +import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; +import { useEscrowDetails } from '@/services/api/use-escrows-details'; export const RoleDetailsEscrowsTable = ({ role }: { role: string | null }) => { const { data } = useEscrowDetails({ role }); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx index 153f8c0c76..7e287f4b5a 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx @@ -1,13 +1,13 @@ import TableCell from '@mui/material/TableCell'; import MuiTableBody from '@mui/material/TableBody'; import { useEffect } from 'react'; -import { handleErrorMessage } from '@services/handle-error-message'; +import { handleErrorMessage } from '@/services/handle-error-message'; import CircularProgress from '@mui/material/CircularProgress'; -import { EscrowsTableBodyContainer } from '@pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer'; -import { useEscrowDetails } from '@services/api/use-escrows-details'; -import { AddressDetailsOperator } from '@services/api/use-address-details'; -import { useEscrowDetailsDto } from '@utils/hooks/use-escrows-details-dto'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; +import { EscrowsTableBodyContainer } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer'; +import { useEscrowDetails } from '@/services/api/use-escrows-details'; +import { AddressDetailsOperator } from '@/services/api/use-address-details'; +import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; import { useNavigate } from 'react-router-dom'; import { Stack, TableRow } from '@mui/material'; import Link from '@mui/material/Link'; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx index ab9d49fdf2..4d8f31ff0f 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx @@ -1,26 +1,26 @@ -import PageWrapper from '@components/PageWrapper'; +import PageWrapper from '@/components/PageWrapper'; import Stack from '@mui/material/Stack'; -import ShadowIcon from '@components/ShadowIcon'; -import Clipboard from '@components/Clipboard'; +import ShadowIcon from '@/components/ShadowIcon'; +import Clipboard from '@/components/Clipboard'; import { useEffect, useState } from 'react'; import { useLocation, useParams } from 'react-router-dom'; -import EscrowAddress from '@pages/SearchResults/EscrowAddress'; -import WalletAddress from '@pages/SearchResults/WalletAddress'; -import NothingFound from '@components/NothingFound'; -import Breadcrumbs from '@components/Breadcrumbs'; -import SearchBar from '@components/SearchBar/SearchBar'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; -import Loader from '@components/Loader'; -import { getNetwork } from '@utils/config/networks'; +import EscrowAddress from '@/pages/SearchResults/EscrowAddress'; +import WalletAddress from '@/pages/SearchResults/WalletAddress'; +import NothingFound from '@/components/NothingFound'; +import Breadcrumbs from '@/components/Breadcrumbs'; +import SearchBar from '@/components/SearchBar/SearchBar'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; +import Loader from '@/components/Loader'; +import { getNetwork } from '@/utils/config/networks'; import { AddressDetails, useAddressDetails, -} from '@services/api/use-address-details'; -import { handleErrorMessage } from '@services/handle-error-message'; -import RoleDetails from '@pages/SearchResults/RoleDetails/RoleDetails'; +} from '@/services/api/use-address-details'; +import { handleErrorMessage } from '@/services/handle-error-message'; +import RoleDetails from '@/pages/SearchResults/RoleDetails/RoleDetails'; import { AxiosError } from 'axios'; -import { WalletIcon } from '@components/Icons/WalletIcon'; -import { EscrowAddressIcon } from '@components/Icons/EscrowAddressIcon'; +import { WalletIcon } from '@/components/Icons/WalletIcon'; +import { EscrowAddressIcon } from '@/components/Icons/EscrowAddressIcon'; import { WalletAddressTransactionsTable } from './WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable'; const renderCurrentResultType = ( diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx index 2d1d293b0b..db88e673a7 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx @@ -4,9 +4,9 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { NumericFormat } from 'react-number-format'; -import SectionWrapper from '@components/SectionWrapper'; +import SectionWrapper from '@/components/SectionWrapper'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; type Props = { amountStaked?: number | null; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx index 89ac4b736a..e46be2a925 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx @@ -4,8 +4,8 @@ import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { NumericFormat } from 'react-number-format'; -import TitleSectionWrapper from '@components/SearchResults'; -import SectionWrapper from '@components/SectionWrapper'; +import TitleSectionWrapper from '@/components/SearchResults'; +import SectionWrapper from '@/components/SectionWrapper'; import HmtBalance from '../HmtBalance'; import HmtPrice from '../HmtPrice'; import KVStore from '../KVStore'; @@ -15,8 +15,8 @@ import StakeInfo from '../StakeInfo'; import { AddressDetailsOperator, AddressDetailsWallet, -} from '@services/api/use-address-details'; -import { useIsMobile } from '@utils/hooks/use-breakpoints'; +} from '@/services/api/use-address-details'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; type Props = { data: AddressDetailsWallet | AddressDetailsOperator; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx index 10b3927722..9fcee2249b 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx @@ -8,12 +8,12 @@ import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; -import { TransactionsTableHead } from '@pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead'; -import { TransactionsTableBody } from '@pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody'; -import SectionWrapper from '@components/SectionWrapper'; +import { TransactionsTableHead } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead'; +import { TransactionsTableBody } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody'; +import SectionWrapper from '@/components/SectionWrapper'; -import { useTransactionDetailsDto } from '@utils/hooks/use-transactions-details-dto'; -import { useTransactionDetails } from '@services/api/use-transaction-details'; +import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; +import { useTransactionDetails } from '@/services/api/use-transaction-details'; export const WalletAddressTransactionsTable = () => { const { data } = useTransactionDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod.tsx index 61b1a638b9..fa4c0fb96f 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod.tsx @@ -1,7 +1,7 @@ import Box from '@mui/material/Box/Box'; import Typography from '@mui/material/Typography'; -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; const methodAttributes: Record< string, diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx index e1f229a167..a524fed198 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx @@ -1,6 +1,6 @@ -import { formatHMTDecimals } from '@helpers/formatHMTDecimals'; +import { formatHMTDecimals } from '@/helpers/formatHMTDecimals'; import Typography from '@mui/material/Typography'; -import { useHMTPrice } from '@services/api/use-hmt-price'; +import { useHMTPrice } from '@/services/api/use-hmt-price'; export const TransactionTableCellValue = ({ value }: { value: string }) => { const { isError, isPending } = useHMTPrice(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx index d5b7f153af..bdbd20bca1 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx @@ -8,16 +8,16 @@ import CircularProgress from '@mui/material/CircularProgress'; import AddCircleIcon from '@mui/icons-material/AddCircle'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import RemoveCircleIcon from '@mui/icons-material/RemoveCircle'; -import AbbreviateClipboard from '@components/SearchResults/AbbreviateClipboard'; -import { colorPalette } from '@assets/styles/color-palette'; +import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; +import { colorPalette } from '@/assets/styles/color-palette'; -import { TransactionTableCellMethod } from '@pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod'; -import { TransactionTableCellValue } from '@pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue'; -import { useTransactionDetails } from '@services/api/use-transaction-details'; -import { TransactionsTableBodyContainer } from '@pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer'; -import { handleErrorMessage } from '@services/handle-error-message'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; -import { useTransactionDetailsDto } from '@utils/hooks/use-transactions-details-dto'; +import { TransactionTableCellMethod } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod'; +import { TransactionTableCellValue } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue'; +import { useTransactionDetails } from '@/services/api/use-transaction-details'; +import { TransactionsTableBodyContainer } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer'; +import { handleErrorMessage } from '@/services/handle-error-message'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; +import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; export const TransactionsTableBody: React.FC = () => { const { data, isPending, isError, error } = useTransactionDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx index 1e7c35be6d..7f4f4545e8 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx @@ -5,7 +5,7 @@ import TableRow from '@mui/material/TableRow'; import TableCell from '@mui/material/TableCell'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; -import CustomTooltip from '@components/CustomTooltip'; +import CustomTooltip from '@/components/CustomTooltip'; const InfoTooltip = ({ title }: { title: string }) => ( diff --git a/packages/apps/dashboard/client/src/services/api-paths.ts b/packages/apps/dashboard/client/src/services/api-paths.ts index dfa16f9f30..7a9cb06fb0 100644 --- a/packages/apps/dashboard/client/src/services/api-paths.ts +++ b/packages/apps/dashboard/client/src/services/api-paths.ts @@ -1,6 +1,6 @@ export const apiPaths = { hcaptchaGeneralStats: { - path: '/stats/hcaptcha/general', + path: "/stats/hcaptcha/general", }, generalStats: { path: '/stats/general', diff --git a/packages/apps/dashboard/client/src/services/api/use-address-details.tsx b/packages/apps/dashboard/client/src/services/api/use-address-details.tsx index 51a4487c6e..2a8c45a444 100644 --- a/packages/apps/dashboard/client/src/services/api/use-address-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-address-details.tsx @@ -2,9 +2,9 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; import { validateResponse } from '../validate-response'; -import { reputationSchema } from '@services/api/use-leaderboard-details'; +import { reputationSchema } from '@/services/api/use-leaderboard-details'; import { Role } from '@human-protocol/sdk'; const transformOptionalTokenAmount = ( diff --git a/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx b/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx index f724d3cea8..692f78ff00 100644 --- a/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx @@ -2,10 +2,10 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; -import { validateResponse } from '@services/validate-response'; -import { useEscrowDetailsDto } from '@utils/hooks/use-escrows-details-dto'; -import { AddressDetailsOperator } from '@services/api/use-address-details'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; +import { validateResponse } from '@/services/validate-response'; +import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; +import { AddressDetailsOperator } from '@/services/api/use-address-details'; const escrowDetailsSuccessResponseSchema = z.object({ chainId: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx b/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx index 244e21cde8..fe4e624ab3 100644 --- a/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { validateResponse } from '@services/validate-response'; +import { validateResponse } from '@/services/validate-response'; const successGeneralStatsResponseSchema = z.object({ totalHolders: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx b/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx index b08cd17b31..f588b10c80 100644 --- a/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx @@ -2,8 +2,8 @@ import { useQuery, keepPreviousData } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { validateResponse } from '@services/validate-response'; -import { useGraphPageChartParams } from '@utils/hooks/use-graph-page-chart-params'; +import { validateResponse } from '@/services/validate-response'; +import { useGraphPageChartParams } from '@/utils/hooks/use-graph-page-chart-params'; import { useDebounce } from 'use-debounce'; import { useMemo } from 'react'; import dayjs from 'dayjs'; diff --git a/packages/apps/dashboard/client/src/services/api/use-hcaptcha-general-stats.tsx b/packages/apps/dashboard/client/src/services/api/use-hcaptcha-general-stats.tsx index 64d9e27aeb..e6256c24fe 100644 --- a/packages/apps/dashboard/client/src/services/api/use-hcaptcha-general-stats.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-hcaptcha-general-stats.tsx @@ -1,8 +1,10 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; + +import { validateResponse } from '@/services/validate-response'; + import { apiPaths } from '../api-paths'; -import { validateResponse } from '@services/validate-response'; +import { httpService } from '../http-service'; const successHcaptchaGeneralStatsResponseSchema = z.object({ solved: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx b/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx index 4a1ae8629b..8979b59706 100644 --- a/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { validateResponse } from '@services/validate-response'; +import { validateResponse } from '@/services/validate-response'; const successHMTPriceResponseSchema = z.object({ hmtPrice: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx b/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx index 55ef3228a4..6c1b3bd37f 100644 --- a/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx @@ -1,10 +1,10 @@ import { useQuery } from '@tanstack/react-query'; -import { apiPaths } from '@services/api-paths'; -import { httpService } from '@services/http-service'; -import { validateResponse } from '@services/validate-response'; +import { apiPaths } from '@/services/api-paths'; +import { httpService } from '@/services/http-service'; +import { validateResponse } from '@/services/validate-response'; import { z } from 'zod'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; const kvstoreDataSchema = z.array( z.object({ diff --git a/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx b/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx index 39390eea7c..a44a6a1e63 100644 --- a/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx @@ -2,8 +2,8 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { validateResponse } from '@services/validate-response'; -import { useLeaderboardSearch } from '@utils/hooks/use-leaderboard-search'; +import { validateResponse } from '@/services/validate-response'; +import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; export const reputationSchema = z.unknown().transform((value) => { try { @@ -13,6 +13,7 @@ export const reputationSchema = z.unknown().transform((value) => { return knownReputation; } catch (error) { + console.error(error); return 'Unknown'; } }); diff --git a/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx b/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx index a5d06bb1fd..177a189962 100644 --- a/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx @@ -2,9 +2,9 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; import { httpService } from '../http-service'; import { apiPaths } from '../api-paths'; -import { useWalletSearch } from '@utils/hooks/use-wallet-search'; -import { useTransactionDetailsDto } from '@utils/hooks/use-transactions-details-dto'; -import { validateResponse } from '@services/validate-response'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; +import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; +import { validateResponse } from '@/services/validate-response'; const internalTransactionSchema = z.object({ from: z.string(), diff --git a/packages/apps/dashboard/client/src/services/validate-response.ts b/packages/apps/dashboard/client/src/services/validate-response.ts index a1c2b642a3..d91f29b073 100644 --- a/packages/apps/dashboard/client/src/services/validate-response.ts +++ b/packages/apps/dashboard/client/src/services/validate-response.ts @@ -12,7 +12,7 @@ export const validateResponse = ( console.error('Unexpected response'); if (error instanceof ZodError) { error.issues.forEach((issue) => { - console.log(issue); + console.error(issue); }); } console.error(error); diff --git a/packages/apps/dashboard/client/src/theme.tsx b/packages/apps/dashboard/client/src/theme.tsx index d961419f4a..6ecdf76fc9 100644 --- a/packages/apps/dashboard/client/src/theme.tsx +++ b/packages/apps/dashboard/client/src/theme.tsx @@ -4,7 +4,7 @@ import { PaletteColor, } from '@mui/material/styles/createPalette'; import { Shadows, ThemeOptions } from '@mui/material'; -import { colorPalette } from '@assets/styles/color-palette'; +import { colorPalette } from '@/assets/styles/color-palette'; import { CSSProperties } from 'react'; declare module '@mui/material/Typography' { @@ -311,7 +311,7 @@ const theme: ThemeOptions = createTheme({ whiteSpace: 'nowrap', color: colorPalette.fog.main, justifySelf: 'end', - marginBottom: `17px`, + marginBottom: '17px', position: 'relative', right: '-38px', }, diff --git a/packages/apps/dashboard/client/src/utils/config/networks.ts b/packages/apps/dashboard/client/src/utils/config/networks.ts index bb1839642d..de55e0aa7a 100644 --- a/packages/apps/dashboard/client/src/utils/config/networks.ts +++ b/packages/apps/dashboard/client/src/utils/config/networks.ts @@ -1,6 +1,6 @@ import type { Chain } from 'viem/chains'; import * as chains from 'viem/chains'; -import { env } from '@helpers/env'; +import { env } from '@/helpers/env'; //TODO: temporal fix. Should be fetched from API. https://github.com/humanprotocol/human-protocol/issues/2855 const ENABLED_CHAIN_IDS = env.VITE_ENABLED_CHAIN_IDS; diff --git a/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts b/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts index 752b65b58b..78013d408c 100644 --- a/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts +++ b/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts @@ -1,8 +1,8 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { networks as allNetworks } from '@utils/config/networks'; -import { httpService } from '@services/http-service'; -import { apiPaths } from '@services/api-paths'; +import { networks as allNetworks } from '@/utils/config/networks'; +import { httpService } from '@/services/http-service'; +import { apiPaths } from '@/services/api-paths'; import { useMemo } from 'react'; const enabledChainsSchema = z.array(z.number()); diff --git a/packages/apps/dashboard/client/tsconfig.json b/packages/apps/dashboard/client/tsconfig.json index f6331c83d6..e664d9ef23 100644 --- a/packages/apps/dashboard/client/tsconfig.json +++ b/packages/apps/dashboard/client/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, @@ -21,13 +21,7 @@ "noFallthroughCasesInSwitch": true, "baseUrl": "./", "paths": { - "@components/*": ["src/components/*"], - "@helpers/*": ["src/helpers/*"], - "@assets/*": ["src/assets/*"], - "@pages/*": ["src/pages/*"], - "@api/*": ["src/api/*"], - "@utils/*": ["src/utils/*"], - "@services/*": ["src/services/*"] + "@/*": ["src/*"] } }, "include": ["src"], diff --git a/packages/apps/dashboard/client/vite.config.ts b/packages/apps/dashboard/client/vite.config.ts index 9f7cc79504..1c9c63c387 100644 --- a/packages/apps/dashboard/client/vite.config.ts +++ b/packages/apps/dashboard/client/vite.config.ts @@ -18,13 +18,7 @@ export default defineConfig({ ], resolve: { alias: { - '@components': path.resolve(__dirname, './src/components'), - '@helpers': path.resolve(__dirname, './src/helpers'), - '@assets': path.resolve(__dirname, './src/assets'), - '@pages': path.resolve(__dirname, './src/pages'), - '@api': path.resolve(__dirname, './src/api'), - '@utils': path.resolve(__dirname, './src/utils'), - '@services': path.resolve(__dirname, './src/services'), + '@': path.resolve(__dirname, './src'), }, }, optimizeDeps: { From 46343c17de1e3e435c252eb302de1b06024fef42 Mon Sep 17 00:00:00 2001 From: kirill Date: Mon, 2 Jun 2025 17:53:28 +0300 Subject: [PATCH 2/8] fix: lint --- packages/apps/dashboard/client/src/services/api-paths.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps/dashboard/client/src/services/api-paths.ts b/packages/apps/dashboard/client/src/services/api-paths.ts index 7a9cb06fb0..dfa16f9f30 100644 --- a/packages/apps/dashboard/client/src/services/api-paths.ts +++ b/packages/apps/dashboard/client/src/services/api-paths.ts @@ -1,6 +1,6 @@ export const apiPaths = { hcaptchaGeneralStats: { - path: "/stats/hcaptcha/general", + path: '/stats/hcaptcha/general', }, generalStats: { path: '/stats/general', From 0116b3ae29a962f2d801597ed3d5dd727bfce56b Mon Sep 17 00:00:00 2001 From: kirill Date: Mon, 2 Jun 2025 18:00:20 +0300 Subject: [PATCH 3/8] fix: install dependencies --- yarn.lock | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 215 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 387e52425f..20f551ce41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2729,6 +2729,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:^9.27.0": + version: 9.28.0 + resolution: "@eslint/js@npm:9.28.0" + checksum: 10c0/5a6759542490dd9f778993edfbc8d2f55168fd0f7336ceed20fe3870c65499d72fc0bca8d1ae00ea246b0923ea4cba2e0758a8a5507a3506ddcf41c92282abb8 + languageName: node + linkType: hard + "@ethereumjs/common@npm:^3.2.0": version: 3.2.0 resolution: "@ethereumjs/common@npm:3.2.0" @@ -3832,6 +3839,7 @@ __metadata: dependencies: "@emotion/react": "npm:^11.11.4" "@emotion/styled": "npm:^11.11.5" + "@eslint/js": "npm:^9.27.0" "@human-protocol/sdk": "workspace:*" "@mui/icons-material": "npm:^7.0.1" "@mui/material": "npm:^5.15.18" @@ -3851,8 +3859,12 @@ __metadata: clsx: "npm:^2.1.1" dayjs: "npm:^1.11.11" eslint: "npm:^8.57.0" - eslint-plugin-react-hooks: "npm:^5.1.0" + eslint-plugin-import: "npm:^2.31.0" + eslint-plugin-prettier: "npm:^5.4.0" + eslint-plugin-react: "npm:^7.37.5" + eslint-plugin-react-hooks: "npm:^5.2.0" eslint-plugin-react-refresh: "npm:^0.4.11" + globals: "npm:^16.2.0" prettier: "npm:^3.4.2" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" @@ -3864,6 +3876,7 @@ __metadata: styled-components: "npm:^6.1.11" swiper: "npm:^11.1.3" typescript: "npm:^5.6.3" + typescript-eslint: "npm:^8.33.0" use-debounce: "npm:^10.0.2" vite: "npm:^6.2.4" vite-plugin-node-polyfills: "npm:^0.23.0" @@ -7203,6 +7216,13 @@ __metadata: languageName: node linkType: hard +"@pkgr/core@npm:^0.2.4": + version: 0.2.7 + resolution: "@pkgr/core@npm:0.2.7" + checksum: 10c0/951f5ebf2feb6e9dbc202d937f1a364d60f2bf0e3e53594251bcc1d9d2ed0df0a919c49ba162a9499fce73cf46ebe4d7959a8dfbac03511dbe79b69f5fedb804 + languageName: node + linkType: hard + "@pnpm/config.env-replace@npm:^1.1.0": version: 1.1.0 resolution: "@pnpm/config.env-replace@npm:1.1.0" @@ -10234,6 +10254,27 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/eslint-plugin@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.33.0" + dependencies: + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.33.0" + "@typescript-eslint/type-utils": "npm:8.33.0" + "@typescript-eslint/utils": "npm:8.33.0" + "@typescript-eslint/visitor-keys": "npm:8.33.0" + graphemer: "npm:^1.4.0" + ignore: "npm:^7.0.0" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + "@typescript-eslint/parser": ^8.33.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/fdfbba2134bb8aa8effb3686a9ffe0a5d9916b41ccdf4339976e0205734f802fca2631939f892ccedd20eee104d8cd0e691720728baeeee17c0f40d7bfe4205d + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:^5.0.0, @typescript-eslint/eslint-plugin@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" @@ -10317,6 +10358,22 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/parser@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/parser@npm:8.33.0" + dependencies: + "@typescript-eslint/scope-manager": "npm:8.33.0" + "@typescript-eslint/types": "npm:8.33.0" + "@typescript-eslint/typescript-estree": "npm:8.33.0" + "@typescript-eslint/visitor-keys": "npm:8.33.0" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/3f6aa8476d912a749a4f3e6ae6cbf90a881f1892efb7b3c88f6654fa03e770d8da511d0298615b0eda880b3811e157ed60e47e6a21aa309cbf912e2d5d79d73c + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.0.0, @typescript-eslint/parser@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/parser@npm:5.62.0" @@ -10370,6 +10427,17 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/project-service@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/project-service@npm:8.33.0" + dependencies: + "@typescript-eslint/tsconfig-utils": "npm:^8.33.0" + "@typescript-eslint/types": "npm:^8.33.0" + debug: "npm:^4.3.4" + checksum: 10c0/a863d9e3be5ffb53c9d57b25b7a35149dae01afd942dd7fc36bd72a4230676ae12d0f37a789cddaf1baf71e3b35f09436bebbd081336e667b4181b48d0afe8f5 + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/scope-manager@npm:5.62.0" @@ -10410,6 +10478,25 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/scope-manager@npm:8.33.0" + dependencies: + "@typescript-eslint/types": "npm:8.33.0" + "@typescript-eslint/visitor-keys": "npm:8.33.0" + checksum: 10c0/eb259add242ce40642e7272b414c92ae9407d97cb304981f17f0de0846d5c4ab47d41816ef13da3d3976fe0b7a74df291525be27e4fe4f0ab5d35e86d340faa0 + languageName: node + linkType: hard + +"@typescript-eslint/tsconfig-utils@npm:8.33.0, @typescript-eslint/tsconfig-utils@npm:^8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.33.0" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/6e9a8e73e65b925f908f31e00be4f1b8d7e89f45d97fa703f468115943c297fc2cc6f9daa0c12b9607f39186f033ac244515f11710df7e1df8302c815ed57389 + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/type-utils@npm:5.62.0" @@ -10461,6 +10548,21 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/type-utils@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/type-utils@npm:8.33.0" + dependencies: + "@typescript-eslint/typescript-estree": "npm:8.33.0" + "@typescript-eslint/utils": "npm:8.33.0" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/4a81c654ba17e8a50e48249f781cb91cddb990044affda7315d9b259aabd638232c9a98ff5f4d45ea3b258098060864026b746fce93ad6b4dcde5e492d93c855 + languageName: node + linkType: hard + "@typescript-eslint/types@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/types@npm:5.62.0" @@ -10489,6 +10591,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:8.33.0, @typescript-eslint/types@npm:^8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/types@npm:8.33.0" + checksum: 10c0/348b64eb408719d7711a433fc9716e0c2aab8b3f3676f5a1cc2e00269044132282cf655deb6d0dd9817544116909513de3b709005352d186949d1014fad1a3cb + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" @@ -10563,6 +10672,26 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.33.0" + dependencies: + "@typescript-eslint/project-service": "npm:8.33.0" + "@typescript-eslint/tsconfig-utils": "npm:8.33.0" + "@typescript-eslint/types": "npm:8.33.0" + "@typescript-eslint/visitor-keys": "npm:8.33.0" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/677b12b2e5780ffaef508bddbf8712fe2c3413f3d14fd8fd0cfbe22952a81c6642b3cc26984cf27fdfc3dd2457ae5f8aa04437d3b0ae32987a1895f9648ca7b2 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.58.0, @typescript-eslint/utils@npm:^5.62.0": version: 5.62.0 resolution: "@typescript-eslint/utils@npm:5.62.0" @@ -10612,6 +10741,21 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/utils@npm:8.33.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/scope-manager": "npm:8.33.0" + "@typescript-eslint/types": "npm:8.33.0" + "@typescript-eslint/typescript-estree": "npm:8.33.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/a0adb9e13d8f8d8f86ae2e905f3305ad60732e760364b291de66a857a551485d37c23e923299078a47f75d3cca643e1f2aefa010a0beb4cb0d08d0507c1038e1 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:^8.18.1": version: 8.32.0 resolution: "@typescript-eslint/utils@npm:8.32.0" @@ -10667,6 +10811,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:8.33.0": + version: 8.33.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.33.0" + dependencies: + "@typescript-eslint/types": "npm:8.33.0" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10c0/41660f241e78314f69d251792f369ef1eeeab3b40fe4ab11b794d402c95bcb82b61d3e91763e7ab9b0f22011a7ac9c8f9dfd91734d61c9f4eaf4f7660555b53b + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" @@ -15971,7 +16125,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:^2.25.3, eslint-plugin-import@npm:^2.29.0, eslint-plugin-import@npm:^2.29.1": +"eslint-plugin-import@npm:^2.25.3, eslint-plugin-import@npm:^2.29.0, eslint-plugin-import@npm:^2.29.1, eslint-plugin-import@npm:^2.31.0": version: 2.31.0 resolution: "eslint-plugin-import@npm:2.31.0" dependencies: @@ -16095,6 +16249,26 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-prettier@npm:^5.4.0": + version: 5.4.1 + resolution: "eslint-plugin-prettier@npm:5.4.1" + dependencies: + prettier-linter-helpers: "npm:^1.0.0" + synckit: "npm:^0.11.7" + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: ">= 7.0.0 <10.0.0 || >=10.1.0" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: 10c0/bdd9e9473bf3f995521558eb5e2ee70dd4f06cb8b9a6192523cfed76511924fad31ec9af9807cd99f693dc59085e0a1db8a1d3ccc283e98ab30eb32cc7469649 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.3.0, eslint-plugin-react-hooks@npm:^4.6.0": version: 4.6.2 resolution: "eslint-plugin-react-hooks@npm:4.6.2" @@ -16104,7 +16278,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^5.1.0": +"eslint-plugin-react-hooks@npm:^5.1.0, eslint-plugin-react-hooks@npm:^5.2.0": version: 5.2.0 resolution: "eslint-plugin-react-hooks@npm:5.2.0" peerDependencies: @@ -16122,7 +16296,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.27.1, eslint-plugin-react@npm:^7.34.0, eslint-plugin-react@npm:^7.34.3": +"eslint-plugin-react@npm:^7.27.1, eslint-plugin-react@npm:^7.34.0, eslint-plugin-react@npm:^7.34.3, eslint-plugin-react@npm:^7.37.5": version: 7.37.5 resolution: "eslint-plugin-react@npm:7.37.5" dependencies: @@ -17825,6 +17999,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^16.2.0": + version: 16.2.0 + resolution: "globals@npm:16.2.0" + checksum: 10c0/c2b3ea163faa6f8a38076b471b12f4bda891f7df7f7d2e8294fb4801d735a51a73431bf4c1696c5bf5dbca5e0a0db894698acfcbd3068730c6b12eef185dea25 + languageName: node + linkType: hard + "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -18659,6 +18840,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^7.0.0": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d + languageName: node + linkType: hard + "imask@npm:^7.6.1": version: 7.6.1 resolution: "imask@npm:7.6.1" @@ -26547,6 +26735,15 @@ __metadata: languageName: node linkType: hard +"synckit@npm:^0.11.7": + version: 0.11.8 + resolution: "synckit@npm:0.11.8" + dependencies: + "@pkgr/core": "npm:^0.2.4" + checksum: 10c0/a1de5131ee527512afcaafceb2399b2f3e63678e56b831e1cb2dc7019c972a8b654703a3b94ef4166868f87eb984ea252b467c9d9e486b018ec2e6a55c24dfd8 + languageName: node + linkType: hard + "table-layout@npm:^1.0.2": version: 1.0.2 resolution: "table-layout@npm:1.0.2" @@ -27455,6 +27652,20 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^8.33.0": + version: 8.33.0 + resolution: "typescript-eslint@npm:8.33.0" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:8.33.0" + "@typescript-eslint/parser": "npm:8.33.0" + "@typescript-eslint/utils": "npm:8.33.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/a07b87ed2e4ff71edfc641f0073192e7eb8a169adb3ee99a05370310d73698e92814e56cec760d13f9a180687ac3dd3ba9536461ec9a110ad2543f60950e8c8d + languageName: node + linkType: hard + "typescript@npm:5.7.2": version: 5.7.2 resolution: "typescript@npm:5.7.2" From c41dacff4116a0c281939cdb764e84f497814a30 Mon Sep 17 00:00:00 2001 From: kirill Date: Mon, 2 Jun 2025 18:11:38 +0300 Subject: [PATCH 4/8] refactor: sort and order imports --- .../apps/dashboard/client/eslint.config.js | 38 +++++++++---------- .../src/components/Charts/AreaChart.tsx | 17 +++++---- .../components/Charts/CustomChartTooltip.tsx | 14 ++++--- .../src/components/Charts/CustomXAxisTick.tsx | 3 +- .../src/components/Charts/ToggleCharts.tsx | 3 +- .../src/components/Clipboard/Clipboard.tsx | 5 ++- .../src/components/DataEntry/DatePicker.tsx | 8 ++-- .../components/DataEntry/ToggleButtons.tsx | 7 ++-- .../client/src/components/Footer/Footer.tsx | 10 ++--- .../client/src/components/Header/Header.tsx | 10 ++--- .../src/components/Home/GraphSwiper.tsx | 4 +- .../client/src/components/Home/SmallGraph.tsx | 10 ++--- .../src/components/Icons/AvalancheIcon.tsx | 3 +- .../Icons/BinanceSmartChainIcon.tsx | 3 +- .../client/src/components/Icons/CeloIcon.tsx | 3 +- .../src/components/Icons/DiscordIcon.tsx | 1 + .../components/Icons/EscrowAddressIcon.tsx | 3 +- .../src/components/Icons/EthereumIcon.tsx | 3 +- .../components/Icons/ExchangeOracleIcon.tsx | 3 +- .../client/src/components/Icons/HumanIcon.tsx | 3 +- .../src/components/Icons/JobLauncher.tsx | 3 +- .../src/components/Icons/LeaderboardIcon.tsx | 3 +- .../src/components/Icons/LogoBlockIcon.tsx | 3 +- .../components/Icons/LogoBlockIconMobile.tsx | 3 +- .../components/Icons/MoonbaseAlphaIcon.tsx | 3 +- .../src/components/Icons/MoonbeamIcon.tsx | 3 +- .../src/components/Icons/PolygonIcon.tsx | 3 +- .../src/components/Icons/RecordingOracle.tsx | 3 +- .../src/components/Icons/ReputationOracle.tsx | 3 +- .../src/components/Icons/WalletIcon.tsx | 3 +- .../src/components/Icons/XLayerIcon.tsx | 3 +- .../client/src/components/Loader/index.tsx | 2 +- .../src/components/NetworkIcon/index.tsx | 12 +++--- .../components/PageWrapper/PageWrapper.tsx | 4 +- .../src/components/SearchBar/SearchBar.tsx | 18 +++++---- .../SearchResults/AbbreviateClipboard.tsx | 14 ++++--- .../SearchResults/TitleSectionWrapper.tsx | 6 +-- .../src/components/ShadowIcon/ShadowIcon.tsx | 1 + .../Leaderboard/components/AddressCell.tsx | 3 +- .../Leaderboard/components/ChainCell.tsx | 1 + .../components/DataGridWrapper.tsx | 4 +- .../Leaderboard/components/EntityIcon.tsx | 3 +- .../Leaderboard/components/RoleCell.tsx | 10 +++-- .../Leaderboard/components/SelectNetwork.tsx | 18 +++++---- .../Leaderboard/hooks/useDataGrid.tsx | 13 ++++--- .../client/src/features/Leaderboard/index.tsx | 7 ++-- packages/apps/dashboard/client/src/main.tsx | 11 ++++-- .../client/src/pages/Graph/Graph.tsx | 5 ++- .../dashboard/client/src/pages/Home/Home.tsx | 18 ++++----- .../client/src/pages/Home/Leaderboard.tsx | 1 + .../client/src/pages/Leaderboard/index.tsx | 5 ++- .../EscrowAddress/EscrowAddress.tsx | 3 +- .../src/pages/SearchResults/KVStore/index.tsx | 6 +-- .../SearchResults/ReputationScore/index.tsx | 5 ++- .../SearchResults/RoleDetails/RoleDetails.tsx | 24 ++++++------ .../RoleDetailsEscrowsTable.tsx | 10 ++--- .../tableComponents/EscrowsTableBody.tsx | 17 +++++---- .../EscrowsTableBodyContainer.tsx | 2 +- .../src/pages/SearchResults/SearchResults.tsx | 31 ++++++++------- .../pages/SearchResults/StakeInfo/index.tsx | 1 - .../WalletAddress/WalletAddress.tsx | 11 +++--- .../WalletAddressTransactionsTable.tsx | 9 ++--- .../cells/TransactionTableCellValue.tsx | 3 +- .../tableComponents/TransactionsTableBody.tsx | 21 +++++----- .../TransactionsTableBodyContainer.tsx | 2 +- .../tableComponents/TransactionsTableHead.tsx | 6 +-- .../src/services/api/use-address-details.tsx | 11 ++++-- .../src/services/api/use-escrows-details.tsx | 10 +++-- .../src/services/api/use-general-stats.tsx | 6 ++- .../api/use-graph-page-chart-data.tsx | 13 ++++--- .../client/src/services/api/use-hmt-price.tsx | 6 ++- .../src/services/api/use-kvstore-data.tsx | 2 +- .../services/api/use-leaderboard-details.tsx | 6 ++- .../services/api/use-transaction-details.tsx | 10 +++-- .../client/src/services/global.type.ts | 2 +- .../client/src/services/http-service.ts | 1 + packages/apps/dashboard/client/src/theme.tsx | 7 +++- .../client/src/utils/config/networks.ts | 1 + .../src/utils/hooks/use-filtered-networks.ts | 8 ++-- packages/apps/dashboard/client/vite.config.ts | 7 ++-- 80 files changed, 337 insertions(+), 244 deletions(-) diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js index f9231cd4a2..2d13e39d57 100644 --- a/packages/apps/dashboard/client/eslint.config.js +++ b/packages/apps/dashboard/client/eslint.config.js @@ -50,25 +50,25 @@ export default [ 'react/react-in-jsx-scope': 'off', 'react-hooks/exhaustive-deps': 'warn', 'react-hooks/rules-of-hooks': 'error', - // 'import/order': [ - // 'error', - // { - // 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], - // 'pathGroups': [ - // { - // 'pattern': 'react', - // 'group': 'external', - // 'position': 'before' - // } - // ], - // 'pathGroupsExcludedImportTypes': ['react'], - // 'newlines-between': 'always', - // 'alphabetize': { - // 'order': 'asc', - // 'caseInsensitive': true - // } - // } - // ], + 'import/order': [ + 'error', + { + 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], + 'pathGroups': [ + { + 'pattern': 'react', + 'group': 'external', + 'position': 'before' + } + ], + 'pathGroupsExcludedImportTypes': ['react'], + 'newlines-between': 'always', + 'alphabetize': { + 'order': 'asc', + 'caseInsensitive': true + } + } + ], 'import/no-duplicates': 'error', 'import/no-unresolved': 'error', '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], diff --git a/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx b/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx index 900cc36c0e..456135b49d 100644 --- a/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/AreaChart.tsx @@ -1,3 +1,9 @@ +import { useEffect, useRef, useState } from 'react'; + +import { Typography } from '@mui/material'; +import Card from '@mui/material/Card'; +import Stack from '@mui/material/Stack'; +import dayjs, { Dayjs } from 'dayjs'; import { CartesianGrid, Tooltip, @@ -7,17 +13,12 @@ import { Area, ResponsiveContainer, } from 'recharts'; -import CustomChartTooltip from './CustomChartTooltip'; -import { useEffect, useRef, useState } from 'react'; -import Card from '@mui/material/Card'; -import { Typography } from '@mui/material'; -import Stack from '@mui/material/Stack'; + import { colorPalette } from '@/assets/styles/color-palette'; import CustomXAxisTick from '@/components/Charts/CustomXAxisTick'; +import ToggleCharts from '@/components/Charts/ToggleCharts'; import DatePicker from '@/components/DataEntry/DatePicker'; import ToggleButtons from '@/components/DataEntry/ToggleButtons'; -import dayjs, { Dayjs } from 'dayjs'; -import ToggleCharts from '@/components/Charts/ToggleCharts'; import { formatNumber } from '@/helpers/formatNumber'; import { GraphPageChartData, @@ -28,6 +29,8 @@ import { useGraphPageChartParams, } from '@/utils/hooks/use-graph-page-chart-params'; +import CustomChartTooltip from './CustomChartTooltip'; + export type GraphPageChartDataConfigObject = Partial< Record >; diff --git a/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx b/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx index f2dc987085..d27479a7ef 100644 --- a/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/CustomChartTooltip.tsx @@ -1,13 +1,15 @@ -import { TooltipProps } from 'recharts'; -import Card from '@mui/material/Card'; -import Box from '@mui/material/Box'; +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 Stack from '@mui/material/Stack'; -import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; +import { NumericFormat } from 'react-number-format'; +import { TooltipProps } from 'recharts'; + import { colorPalette } from '@/assets/styles/color-palette'; -import { formatDate } from '@/helpers/formatDate'; import { GraphPageChartDataConfigObject } from '@/components/Charts/AreaChart'; -import { NumericFormat } from 'react-number-format'; +import { formatDate } from '@/helpers/formatDate'; + const renderTitle = (title: string) => { const currentTitle: GraphPageChartDataConfigObject = { diff --git a/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx b/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx index 749f7a142d..46fc03a3f8 100644 --- a/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/CustomXAxisTick.tsx @@ -1,6 +1,7 @@ -import { colorPalette } from '@/assets/styles/color-palette'; // @ts-expect-error -- import error, but this type work property import { ContentRenderer } from 'recharts'; + +import { colorPalette } from '@/assets/styles/color-palette'; import { formatDate } from '@/helpers/formatDate'; const CustomXAxisTick = ({ x, y, payload }: ContentRenderer) => { diff --git a/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx b/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx index 7c0a9541bf..58d2196304 100644 --- a/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx +++ b/packages/apps/dashboard/client/src/components/Charts/ToggleCharts.tsx @@ -1,6 +1,7 @@ import { FormControlLabel, FormGroup, Typography } from '@mui/material'; -import Stack from '@mui/material/Stack'; import Checkbox from '@mui/material/Checkbox'; +import Stack from '@mui/material/Stack'; + import { FormatNumber } from '@/components/Home/FormatNumber'; interface ToggleChartsProps { diff --git a/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx b/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx index aaead34bdc..7601d81cf3 100644 --- a/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx +++ b/packages/apps/dashboard/client/src/components/Clipboard/Clipboard.tsx @@ -1,10 +1,11 @@ import { useState } from 'react'; +import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import Card from '@mui/material/Card'; +import IconButton from '@mui/material/IconButton'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import IconButton from '@mui/material/IconButton'; -import ContentCopyIcon from '@mui/icons-material/ContentCopy'; + import CustomTooltip from '@/components/CustomTooltip'; interface ClipboardProps { diff --git a/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx b/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx index 69b21c5543..a2394d1781 100644 --- a/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx +++ b/packages/apps/dashboard/client/src/components/DataEntry/DatePicker.tsx @@ -1,3 +1,6 @@ +import { Dispatch, SetStateAction, useState } from 'react'; + +import Typography from '@mui/material/Typography'; import { DatePickerProps, LocalizationProvider, @@ -5,14 +8,13 @@ import { } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { DatePicker as DatePickerMui } from '@mui/x-date-pickers/DatePicker'; -import type { Dayjs } from 'dayjs'; -import { Dispatch, SetStateAction, useState } from 'react'; -import Typography from '@mui/material/Typography'; import { BaseSingleInputFieldProps, DateValidationError, FieldSection, } from '@mui/x-date-pickers/models'; +import type { Dayjs } from 'dayjs'; + import { colorPalette } from '@/assets/styles/color-palette'; interface CustomDateFieldProps diff --git a/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx b/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx index 36f134831e..5383d14c25 100644 --- a/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx +++ b/packages/apps/dashboard/client/src/components/DataEntry/ToggleButtons.tsx @@ -1,13 +1,14 @@ -import ToggleButton from '@mui/material/ToggleButton'; -import Typography from '@mui/material/Typography'; import { styled } from '@mui/material'; +import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; +import Typography from '@mui/material/Typography'; +import dayjs from 'dayjs'; + import { TIME_PERIOD_OPTIONS, TimePeriod, useGraphPageChartParams, } from '@/utils/hooks/use-graph-page-chart-params'; -import dayjs from 'dayjs'; export const StyledToggleButtonGroup = styled(ToggleButtonGroup)( ({ theme }) => ({ diff --git a/packages/apps/dashboard/client/src/components/Footer/Footer.tsx b/packages/apps/dashboard/client/src/components/Footer/Footer.tsx index 4873cc440a..a649b59936 100644 --- a/packages/apps/dashboard/client/src/components/Footer/Footer.tsx +++ b/packages/apps/dashboard/client/src/components/Footer/Footer.tsx @@ -1,13 +1,13 @@ import { FC } from 'react'; +import GitHubIcon from '@mui/icons-material/GitHub'; +import LinkedInIcon from '@mui/icons-material/LinkedIn'; +import TelegramIcon from '@mui/icons-material/Telegram'; +import TwitterIcon from '@mui/icons-material/Twitter'; +import { IconButton, styled } from '@mui/material'; import Box from '@mui/material/Box'; import Link from '@mui/material/Link'; -import { IconButton, styled } from '@mui/material'; import Typography from '@mui/material/Typography'; -import TwitterIcon from '@mui/icons-material/Twitter'; -import LinkedInIcon from '@mui/icons-material/LinkedIn'; -import GitHubIcon from '@mui/icons-material/GitHub'; -import TelegramIcon from '@mui/icons-material/Telegram'; import DiscordIcon from '@/components/Icons/DiscordIcon'; import { env } from '@/helpers/env'; diff --git a/packages/apps/dashboard/client/src/components/Header/Header.tsx b/packages/apps/dashboard/client/src/components/Header/Header.tsx index 0e4a7da660..1d0197b81f 100644 --- a/packages/apps/dashboard/client/src/components/Header/Header.tsx +++ b/packages/apps/dashboard/client/src/components/Header/Header.tsx @@ -1,15 +1,15 @@ import { FC, useState } from 'react'; +import CloseIcon from '@mui/icons-material/Close'; +import MenuIcon from '@mui/icons-material/Menu'; +import { Link as MuiLink } from '@mui/material'; import AppBar from '@mui/material/AppBar'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; -import IconButton from '@mui/material/IconButton'; -import { Link as MuiLink } from '@mui/material'; -import CloseIcon from '@mui/icons-material/Close'; -import MenuIcon from '@mui/icons-material/Menu'; import Drawer from '@mui/material/Drawer'; -import Toolbar from '@mui/material/Toolbar'; +import IconButton from '@mui/material/IconButton'; import styled from '@mui/material/styles/styled'; +import Toolbar from '@mui/material/Toolbar'; import { Link } from 'react-router-dom'; import { LogoBlockIcon } from '@/components/Icons/LogoBlockIcon'; diff --git a/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx b/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx index 1c62b8e00d..cb42b9e8f5 100644 --- a/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx +++ b/packages/apps/dashboard/client/src/components/Home/GraphSwiper.tsx @@ -1,11 +1,13 @@ +import { useEffect } from 'react'; + import { Navigation } from 'swiper/modules'; import { Swiper, SwiperSlide } from 'swiper/react'; + import SmallGraph from '@/components/Home/SmallGraph'; import 'swiper/css'; import 'swiper/css/navigation'; import { useGraphPageChartData } from '@/services/api/use-graph-page-chart-data'; import { useGraphPageChartParams } from '@/utils/hooks/use-graph-page-chart-params'; -import { useEffect } from 'react'; const GraphSwiper = () => { const { data } = useGraphPageChartData(); diff --git a/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx b/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx index 94d9b1762b..c5484fcba4 100644 --- a/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx +++ b/packages/apps/dashboard/client/src/components/Home/SmallGraph.tsx @@ -1,5 +1,9 @@ import { Fragment } from 'react'; +import Box from '@mui/material/Box'; +import Card from '@mui/material/Card'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { AreaChart, Area, @@ -10,13 +14,9 @@ import { ResponsiveContainer, TooltipProps, } from 'recharts'; -import Box from '@mui/material/Box'; -import Card from '@mui/material/Card'; -import Stack from '@mui/material/Stack'; -import ToggleButtons from '@/components/DataEntry/ToggleButtons'; -import Typography from '@mui/material/Typography'; import { colorPalette } from '@/assets/styles/color-palette'; +import ToggleButtons from '@/components/DataEntry/ToggleButtons'; import { formatDate } from '@/helpers/formatDate'; import { formatNumber } from '@/helpers/formatNumber'; import { useIsMobile } from '@/utils/hooks/use-breakpoints'; diff --git a/packages/apps/dashboard/client/src/components/Icons/AvalancheIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/AvalancheIcon.tsx index 2a1473418b..83d1eae24a 100644 --- a/packages/apps/dashboard/client/src/components/Icons/AvalancheIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/AvalancheIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const AvalancheIcon: FC = (props) => { return ( = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/CeloIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/CeloIcon.tsx index 08d77b3a59..19e30cba4d 100644 --- a/packages/apps/dashboard/client/src/components/Icons/CeloIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/CeloIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const CeloIcon: FC = (props) => { return ( = (props) => { diff --git a/packages/apps/dashboard/client/src/components/Icons/EscrowAddressIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/EscrowAddressIcon.tsx index a8c8776d97..754095c5b6 100644 --- a/packages/apps/dashboard/client/src/components/Icons/EscrowAddressIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/EscrowAddressIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const EscrowAddressIcon: FC = (props) => { return ( = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/ExchangeOracleIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/ExchangeOracleIcon.tsx index e6b53725ee..be1d4c4bfd 100644 --- a/packages/apps/dashboard/client/src/components/Icons/ExchangeOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/ExchangeOracleIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const ExchangeOracleIcon: FC = (props) => { return ( = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/JobLauncher.tsx b/packages/apps/dashboard/client/src/components/Icons/JobLauncher.tsx index 650028aa2b..74cd5261e8 100644 --- a/packages/apps/dashboard/client/src/components/Icons/JobLauncher.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/JobLauncher.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const JobLauncher: FC = (props) => { return ( = (props) => { return ( = (props) => { return ( = (props) => { return ( = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/MoonbeamIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/MoonbeamIcon.tsx index 085f24f1d2..b2de436954 100644 --- a/packages/apps/dashboard/client/src/components/Icons/MoonbeamIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/MoonbeamIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const MoonbeamIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/PolygonIcon.tsx b/packages/apps/dashboard/client/src/components/Icons/PolygonIcon.tsx index 26ef262294..9233ed8930 100644 --- a/packages/apps/dashboard/client/src/components/Icons/PolygonIcon.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/PolygonIcon.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const PolygonIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/components/Icons/RecordingOracle.tsx b/packages/apps/dashboard/client/src/components/Icons/RecordingOracle.tsx index 9c02b7cfef..5fe3b28eb0 100644 --- a/packages/apps/dashboard/client/src/components/Icons/RecordingOracle.tsx +++ b/packages/apps/dashboard/client/src/components/Icons/RecordingOracle.tsx @@ -1,6 +1,7 @@ -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; import { FC } from 'react'; +import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; + export const RecordingOracle: FC = (props) => { return ( = (props) => { return ( = (props) => { return ( = (props) => { return ( { const icon = (() => { diff --git a/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx b/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx index 85f4b225a3..d5061f2ad1 100644 --- a/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx +++ b/packages/apps/dashboard/client/src/components/PageWrapper/PageWrapper.tsx @@ -1,7 +1,9 @@ import { FC, PropsWithChildren } from 'react'; + import clsx from 'clsx'; -import Header from '@/components/Header'; + import Footer from '@/components/Footer'; +import Header from '@/components/Header'; const PageWrapper: FC< PropsWithChildren<{ diff --git a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx index 6c6a4a6666..b9d0fb2881 100644 --- a/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx +++ b/packages/apps/dashboard/client/src/components/SearchBar/SearchBar.tsx @@ -1,9 +1,7 @@ import { FC, useCallback, useEffect, useState } from 'react'; -import clsx from 'clsx'; -import { useNavigate } from 'react-router-dom'; -import IconButton from '@mui/material/IconButton'; -import SearchIcon from '@mui/icons-material/Search'; + import CloseIcon from '@mui/icons-material/Close'; +import SearchIcon from '@mui/icons-material/Search'; import { InputAdornment, TextField, @@ -15,11 +13,18 @@ import { Tooltip, CircularProgress, } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; +import clsx from 'clsx'; +import { useNavigate } from 'react-router-dom'; + import { colorPalette } from '@/assets/styles/color-palette'; -import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; -import { useIsMobile } from '@/utils/hooks/use-breakpoints'; import { NetworkIcon } from '@/components/NetworkIcon'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + +import { isValidEVMAddress } from '../../helpers/isValidEVMAddress'; + import { endAdornmentInputAdornmentSx, startAdornmentInputAdornmentSx, @@ -29,7 +34,6 @@ import { muiTextFieldSx, gridSx, } from './SearchBar.styles'; -import { isValidEVMAddress } from '../../helpers/isValidEVMAddress'; interface SearchBarProps { className?: string; diff --git a/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx b/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx index a64f7edabb..e158a4bd15 100644 --- a/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx +++ b/packages/apps/dashboard/client/src/components/SearchResults/AbbreviateClipboard.tsx @@ -1,13 +1,15 @@ -import Stack from '@mui/material/Stack'; -import Typography from '@mui/material/Typography'; -import abbreviateValue from '@/helpers/abbreviateValue'; -import IconButton from '@mui/material/IconButton'; +import { useState } from 'react'; + import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import { colorPalette } from '@/assets/styles/color-palette'; import { Link } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import { useNavigate } from 'react-router-dom'; -import { useState } from 'react'; + +import { colorPalette } from '@/assets/styles/color-palette'; import CustomTooltip from '@/components/CustomTooltip'; +import abbreviateValue from '@/helpers/abbreviateValue'; interface AbbreviateClipboardProps { value: string; diff --git a/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx b/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx index 66edc415e5..a7c49b216a 100644 --- a/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx +++ b/packages/apps/dashboard/client/src/components/SearchResults/TitleSectionWrapper.tsx @@ -1,10 +1,10 @@ import { FC, PropsWithChildren } from 'react'; -import Stack from '@mui/material/Stack'; -import Box from '@mui/material/Box'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; -import Typography from '@mui/material/Typography'; import { SxProps } from '@mui/material'; +import Box from '@mui/material/Box'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import CustomTooltip from '@/components/CustomTooltip'; diff --git a/packages/apps/dashboard/client/src/components/ShadowIcon/ShadowIcon.tsx b/packages/apps/dashboard/client/src/components/ShadowIcon/ShadowIcon.tsx index a01fb875a4..cf79aebfe8 100644 --- a/packages/apps/dashboard/client/src/components/ShadowIcon/ShadowIcon.tsx +++ b/packages/apps/dashboard/client/src/components/ShadowIcon/ShadowIcon.tsx @@ -1,4 +1,5 @@ import { FC } from 'react'; + import clsx from 'clsx'; const ShadowIcon: FC<{ diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx index 74f36c4454..8901834946 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/AddressCell.tsx @@ -1,6 +1,7 @@ -import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; import { Box } from '@mui/material'; +import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; + export const AddressCell = ({ chainId, address, diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx index af0178d8b6..9da3ec67f6 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/ChainCell.tsx @@ -1,4 +1,5 @@ import { Typography } from '@mui/material'; + import { NetworkIcon } from '@/components/NetworkIcon'; import { getNetwork } from '@/utils/config/networks'; diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/DataGridWrapper.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/DataGridWrapper.tsx index f180f5bbc8..741f506a9b 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/DataGridWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/DataGridWrapper.tsx @@ -1,12 +1,12 @@ import { Box, Typography } from '@mui/material'; import { DataGrid } from '@mui/x-data-grid'; +import { colorPalette } from '@/assets/styles/color-palette'; import Loader from '@/components/Loader'; - import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; import { handleErrorMessage } from '@/services/handle-error-message'; import { useIsMobile } from '@/utils/hooks/use-breakpoints'; -import { colorPalette } from '@/assets/styles/color-palette'; + import useDataGrid from '../hooks/useDataGrid'; export const DataGridWrapper = ({ diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/EntityIcon.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/EntityIcon.tsx index 1224dc2fc4..009c31990b 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/EntityIcon.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/EntityIcon.tsx @@ -1,9 +1,10 @@ +import { Role } from '@human-protocol/sdk'; + import { ExchangeOracleIcon } from '@/components/Icons/ExchangeOracleIcon'; import HumanIcon from '@/components/Icons/HumanIcon'; import { JobLauncher } from '@/components/Icons/JobLauncher'; import { RecordingOracle } from '@/components/Icons/RecordingOracle'; import { ReputationOracle } from '@/components/Icons/ReputationOracle'; -import { Role } from '@human-protocol/sdk'; export const EntityIcon: React.FC<{ role: string }> = ({ role }) => { switch (role) { diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx index 0a2a855aa7..e2db9ec66b 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/RoleCell.tsx @@ -1,9 +1,13 @@ -import { Box, Typography } from '@mui/material'; import { Launch as LaunchIcon } from '@mui/icons-material'; -import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { Box, Typography } from '@mui/material'; import { Link } from 'react-router-dom'; -import { EntityIcon } from './EntityIcon'; + import { CaseConverter } from '@/utils/case-converter'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; + + +import { EntityIcon } from './EntityIcon'; + const Wrapper = ({ children, diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx index 2085c7960f..0ff63569cd 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/components/SelectNetwork.tsx @@ -1,14 +1,18 @@ -import Select, { SelectChangeEvent } from '@mui/material/Select'; +import { useEffect } from 'react'; + +import Box from '@mui/material/Box'; +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 Box from '@mui/material/Box'; -import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; -import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; -import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import Select, { SelectChangeEvent } from '@mui/material/Select'; + import { NetworkIcon } from '@/components/NetworkIcon'; -import CircularProgress from '@mui/material/CircularProgress'; -import { useEffect } from 'react'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { useFilteredNetworks } from '@/utils/hooks/use-filtered-networks'; +import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; + + export const SelectNetwork = () => { const { diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx index 3024a545d4..01117644a2 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/hooks/useDataGrid.tsx @@ -1,20 +1,21 @@ import { useMemo } from 'react'; -import { Box, Typography } from '@mui/material'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; +import { Box, Typography } from '@mui/material'; import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; import CustomTooltip from '@/components/CustomTooltip'; -import { RoleCell } from '../components/RoleCell'; +import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; + import { AddressCell } from '../components/AddressCell'; +import { CategoryCell } from '../components/CategoryCell'; import { ChainCell } from '../components/ChainCell'; +import { RoleCell } from '../components/RoleCell'; import { SelectNetwork } from '../components/SelectNetwork'; import { TextCell } from '../components/TextCell'; -import { CategoryCell } from '../components/CategoryCell'; -import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; -import { useIsMobile } from '@/utils/hooks/use-breakpoints'; -import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; const InfoTooltip = ({ title }: { title: string }) => ( diff --git a/packages/apps/dashboard/client/src/features/Leaderboard/index.tsx b/packages/apps/dashboard/client/src/features/Leaderboard/index.tsx index 73356a569a..8ed529d23c 100644 --- a/packages/apps/dashboard/client/src/features/Leaderboard/index.tsx +++ b/packages/apps/dashboard/client/src/features/Leaderboard/index.tsx @@ -5,10 +5,11 @@ import Button from '@mui/material/Button'; import Typography from '@mui/material/Typography'; import { useNavigate } from 'react-router-dom'; -import { SelectNetwork } from './components/SelectNetwork'; -import { DataGridWrapper } from './components/DataGridWrapper'; -import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; import { colorPalette } from '@/assets/styles/color-palette'; +import { LeaderBoardData } from '@/services/api/use-leaderboard-details'; + +import { DataGridWrapper } from './components/DataGridWrapper'; +import { SelectNetwork } from './components/SelectNetwork'; type Props = { data: LeaderBoardData | undefined; diff --git a/packages/apps/dashboard/client/src/main.tsx b/packages/apps/dashboard/client/src/main.tsx index 021e5096e7..f3a7cc1a93 100644 --- a/packages/apps/dashboard/client/src/main.tsx +++ b/packages/apps/dashboard/client/src/main.tsx @@ -1,12 +1,15 @@ import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { ThemeProvider } from '@mui/material/styles'; + import CssBaseline from '@mui/material/CssBaseline'; -import theme from './theme'; +import { ThemeProvider } from '@mui/material/styles'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import ReactDOM from 'react-dom/client'; + import App from './App'; +import theme from './theme'; + import '@/assets/styles/main.scss'; import 'simplebar-react/dist/simplebar.min.css'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const queryClient = new QueryClient({ defaultOptions: { diff --git a/packages/apps/dashboard/client/src/pages/Graph/Graph.tsx b/packages/apps/dashboard/client/src/pages/Graph/Graph.tsx index e96b9a7528..39335560e4 100644 --- a/packages/apps/dashboard/client/src/pages/Graph/Graph.tsx +++ b/packages/apps/dashboard/client/src/pages/Graph/Graph.tsx @@ -1,7 +1,8 @@ -import { AreaChart } from '@/components/Charts'; import { useEffect } from 'react'; -import PageWrapper from '@/components/PageWrapper'; + import Breadcrumbs from '@/components/Breadcrumbs'; +import { AreaChart } from '@/components/Charts'; +import PageWrapper from '@/components/PageWrapper'; import { useGraphPageChartParams } from '@/utils/hooks/use-graph-page-chart-params'; const Graph = () => { diff --git a/packages/apps/dashboard/client/src/pages/Home/Home.tsx b/packages/apps/dashboard/client/src/pages/Home/Home.tsx index 188280c2bf..c595560a32 100644 --- a/packages/apps/dashboard/client/src/pages/Home/Home.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/Home.tsx @@ -1,28 +1,28 @@ import { FC } from 'react'; +import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Divider from '@mui/material/Divider'; -import Grid from '@mui/material/Unstable_Grid2'; -import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; +import styled from '@mui/material/styles/styled'; import Typography from '@mui/material/Typography'; +import Grid from '@mui/material/Unstable_Grid2'; import { Link } from 'react-router-dom'; -import styled from '@mui/material/styles/styled'; +import CustomTooltip from '@/components/CustomTooltip'; +import GraphSwiper from '@/components/Home/GraphSwiper'; +import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; import PageWrapper from '@/components/PageWrapper'; import SearchBar from '@/components/SearchBar/SearchBar'; import ShadowIcon from '@/components/ShadowIcon'; -import { Leaderboard } from './Leaderboard'; -import GraphSwiper from '@/components/Home/GraphSwiper'; import HMTPrice from '@/pages/Home/HMTPrice'; -import TotalNumberOfTasks from '@/pages/Home/TotalNumberOfTasks'; import Holders from '@/pages/Home/Holders'; +import TotalNumberOfTasks from '@/pages/Home/TotalNumberOfTasks'; import TotalTransactions from '@/pages/Home/TotalTransactions'; -import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; -import CustomTooltip from '@/components/CustomTooltip'; - import { useIsMobile } from '@/utils/hooks/use-breakpoints'; +import { Leaderboard } from './Leaderboard'; + const CardWrapper = styled(Grid)(({ theme }) => ({ display: 'flex', background: theme.palette.white.main, diff --git a/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx b/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx index 490d46c857..8666c6bbdd 100644 --- a/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx +++ b/packages/apps/dashboard/client/src/pages/Home/Leaderboard.tsx @@ -1,4 +1,5 @@ import { useLeaderboardDetails } from '@/services/api/use-leaderboard-details'; + import { Leaderboard as LeaderboardFeature } from '../../features/Leaderboard'; export const Leaderboard = () => { diff --git a/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx b/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx index 588dc84758..b32decf434 100644 --- a/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx +++ b/packages/apps/dashboard/client/src/pages/Leaderboard/index.tsx @@ -1,9 +1,10 @@ import Breadcrumbs from '@/components/Breadcrumbs'; +import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; import PageWrapper from '@/components/PageWrapper'; import ShadowIcon from '@/components/ShadowIcon'; -import { Leaderboard } from '../../features/Leaderboard/index'; import { useLeaderboardDetails } from '@/services/api/use-leaderboard-details'; -import { LeaderboardIcon } from '@/components/Icons/LeaderboardIcon'; + +import { Leaderboard } from '../../features/Leaderboard/index'; const LeaderBoard = () => { const { data, status, error } = useLeaderboardDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx index 8642b16b70..922a2c92a5 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/EscrowAddress/EscrowAddress.tsx @@ -4,9 +4,10 @@ import Typography from '@mui/material/Typography'; import TitleSectionWrapper from '@/components/SearchResults'; import SectionWrapper from '@/components/SectionWrapper'; +import { AddressDetailsEscrowSchema } from '@/services/api/use-address-details'; + import HmtBalance from '../HmtBalance'; -import { AddressDetailsEscrowSchema } from '@/services/api/use-address-details'; const EscrowAddress = ({ data: { diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx index fc3d6d460a..bb16776c85 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/KVStore/index.tsx @@ -1,11 +1,11 @@ -import Typography from '@mui/material/Typography'; -import TableBody from '@mui/material/TableBody'; -import TableContainer from '@mui/material/TableContainer'; import Table from '@mui/material/Table'; +import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; +import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; +import Typography from '@mui/material/Typography'; import SectionWrapper from '@/components/SectionWrapper'; import useKvstoreData from '@/services/api/use-kvstore-data'; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx index 544d88c263..5761903f3f 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/ReputationScore/index.tsx @@ -1,9 +1,10 @@ import { FC } from 'react'; -import { Reputation } from '@/services/api/use-leaderboard-details'; -import { colorPalette } from '@/assets/styles/color-palette'; import { Box, Typography } from '@mui/material'; +import { colorPalette } from '@/assets/styles/color-palette'; +import { Reputation } from '@/services/api/use-leaderboard-details'; + type Props = { reputation: Reputation; }; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx index 7b22106362..3dc0530a4a 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetails.tsx @@ -1,3 +1,4 @@ +import { Role } from '@human-protocol/sdk'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; import Link from '@mui/material/Link'; @@ -5,25 +6,24 @@ import List from '@mui/material/List'; import ListItem from '@mui/material/ListItem'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; -import { Role } from '@human-protocol/sdk'; -import SectionWrapper from '@/components/SectionWrapper'; +import ExchangeOracleIcon from '@/assets/icons/exchange-oracle.svg'; +import JobLauncherIcon from '@/assets/icons/job-launcher.svg'; +import RecordingOracleIcon from '@/assets/icons/recording-oracle.svg'; +import ReputationOracleIcon from '@/assets/icons/reputation-oracle.svg'; +import { colorPalette } from '@/assets/styles/color-palette'; import TitleSectionWrapper from '@/components/SearchResults/TitleSectionWrapper'; +import SectionWrapper from '@/components/SectionWrapper'; +import { env } from '@/helpers/env'; import { RoleDetailsEscrowsTable } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable'; +import { AddressDetailsOperator } from '@/services/api/use-address-details'; + +import HmtBalance from '../HmtBalance'; +import HmtPrice from '../HmtPrice'; import KVStore from '../KVStore'; import ReputationScore from '../ReputationScore'; import StakeInfo from '../StakeInfo'; -import HmtBalance from '../HmtBalance'; -import HmtPrice from '../HmtPrice'; - -import ReputationOracleIcon from '@/assets/icons/reputation-oracle.svg'; -import ExchangeOracleIcon from '@/assets/icons/exchange-oracle.svg'; -import JobLauncherIcon from '@/assets/icons/job-launcher.svg'; -import RecordingOracleIcon from '@/assets/icons/recording-oracle.svg'; -import { AddressDetailsOperator } from '@/services/api/use-address-details'; -import { env } from '@/helpers/env'; -import { colorPalette } from '@/assets/styles/color-palette'; interface RoleInfoProps { title: string; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx index 0a5c7b9cea..3364163f08 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/RoleDetailsEscrowsTable.tsx @@ -1,17 +1,17 @@ import { useEffect } from 'react'; import Stack from '@mui/material/Stack'; -import Typography from '@mui/material/Typography'; -import TableContainer from '@mui/material/TableContainer'; import Table from '@mui/material/Table'; -import TablePagination from '@mui/material/TablePagination'; +import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; +import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; +import Typography from '@mui/material/Typography'; -import { EscrowsTableBody } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody'; import SectionWrapper from '@/components/SectionWrapper'; -import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; +import { EscrowsTableBody } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody'; import { useEscrowDetails } from '@/services/api/use-escrows-details'; +import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; export const RoleDetailsEscrowsTable = ({ role }: { role: string | null }) => { const { data } = useEscrowDetails({ role }); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx index 7e287f4b5a..2fb9f4a4f8 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBody.tsx @@ -1,16 +1,19 @@ -import TableCell from '@mui/material/TableCell'; -import MuiTableBody from '@mui/material/TableBody'; import { useEffect } from 'react'; -import { handleErrorMessage } from '@/services/handle-error-message'; + +import { Stack, 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 { useNavigate } from 'react-router-dom'; + import { EscrowsTableBodyContainer } from '@/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer'; -import { useEscrowDetails } from '@/services/api/use-escrows-details'; import { AddressDetailsOperator } from '@/services/api/use-address-details'; +import { useEscrowDetails } from '@/services/api/use-escrows-details'; +import { handleErrorMessage } from '@/services/handle-error-message'; import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; -import { useNavigate } from 'react-router-dom'; -import { Stack, TableRow } from '@mui/material'; -import Link from '@mui/material/Link'; + export const EscrowsTableBody = ({ role, diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer.tsx index 764084e4cd..9b00b73d4f 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/RoleDetails/RoleDetailsEscrows/tableComponents/EscrowsTableBodyContainer.tsx @@ -1,5 +1,5 @@ -import MuiTableBody from '@mui/material/TableBody'; import { Grid } from '@mui/material'; +import MuiTableBody from '@mui/material/TableBody'; export const EscrowsTableBodyContainer = ({ children, diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx index 4d8f31ff0f..707cdf8870 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/SearchResults.tsx @@ -1,26 +1,29 @@ -import PageWrapper from '@/components/PageWrapper'; -import Stack from '@mui/material/Stack'; -import ShadowIcon from '@/components/ShadowIcon'; -import Clipboard from '@/components/Clipboard'; import { useEffect, useState } from 'react'; + +import Stack from '@mui/material/Stack'; +import { AxiosError } from 'axios'; import { useLocation, useParams } from 'react-router-dom'; -import EscrowAddress from '@/pages/SearchResults/EscrowAddress'; -import WalletAddress from '@/pages/SearchResults/WalletAddress'; -import NothingFound from '@/components/NothingFound'; + import Breadcrumbs from '@/components/Breadcrumbs'; -import SearchBar from '@/components/SearchBar/SearchBar'; -import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; +import Clipboard from '@/components/Clipboard'; +import { EscrowAddressIcon } from '@/components/Icons/EscrowAddressIcon'; +import { WalletIcon } from '@/components/Icons/WalletIcon'; import Loader from '@/components/Loader'; -import { getNetwork } from '@/utils/config/networks'; +import NothingFound from '@/components/NothingFound'; +import PageWrapper from '@/components/PageWrapper'; +import SearchBar from '@/components/SearchBar/SearchBar'; +import ShadowIcon from '@/components/ShadowIcon'; +import EscrowAddress from '@/pages/SearchResults/EscrowAddress'; +import RoleDetails from '@/pages/SearchResults/RoleDetails/RoleDetails'; +import WalletAddress from '@/pages/SearchResults/WalletAddress'; import { AddressDetails, useAddressDetails, } from '@/services/api/use-address-details'; import { handleErrorMessage } from '@/services/handle-error-message'; -import RoleDetails from '@/pages/SearchResults/RoleDetails/RoleDetails'; -import { AxiosError } from 'axios'; -import { WalletIcon } from '@/components/Icons/WalletIcon'; -import { EscrowAddressIcon } from '@/components/Icons/EscrowAddressIcon'; +import { getNetwork } from '@/utils/config/networks'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + import { WalletAddressTransactionsTable } from './WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable'; const renderCurrentResultType = ( diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx index db88e673a7..23702ac62b 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/StakeInfo/index.tsx @@ -5,7 +5,6 @@ import Typography from '@mui/material/Typography'; import { NumericFormat } from 'react-number-format'; import SectionWrapper from '@/components/SectionWrapper'; - import { useIsMobile } from '@/utils/hooks/use-breakpoints'; type Props = { diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx index e46be2a925..7259ffea74 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddress.tsx @@ -6,17 +6,18 @@ import { NumericFormat } from 'react-number-format'; import TitleSectionWrapper from '@/components/SearchResults'; import SectionWrapper from '@/components/SectionWrapper'; +import { + AddressDetailsOperator, + AddressDetailsWallet, +} from '@/services/api/use-address-details'; +import { useIsMobile } from '@/utils/hooks/use-breakpoints'; + import HmtBalance from '../HmtBalance'; import HmtPrice from '../HmtPrice'; import KVStore from '../KVStore'; import ReputationScore from '../ReputationScore'; import StakeInfo from '../StakeInfo'; -import { - AddressDetailsOperator, - AddressDetailsWallet, -} from '@/services/api/use-address-details'; -import { useIsMobile } from '@/utils/hooks/use-breakpoints'; type Props = { data: AddressDetailsWallet | AddressDetailsOperator; diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx index 9fcee2249b..5a88d704c6 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/WalletAddressTransactionsTable.tsx @@ -1,19 +1,18 @@ import { useEffect } from 'react'; -import SimpleBar from 'simplebar-react'; import Table from '@mui/material/Table'; import TableContainer from '@mui/material/TableContainer'; import TableFooter from '@mui/material/TableFooter'; import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import Typography from '@mui/material/Typography'; +import SimpleBar from 'simplebar-react'; -import { TransactionsTableHead } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead'; -import { TransactionsTableBody } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody'; import SectionWrapper from '@/components/SectionWrapper'; - -import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; +import { TransactionsTableBody } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody'; +import { TransactionsTableHead } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead'; import { useTransactionDetails } from '@/services/api/use-transaction-details'; +import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; export const WalletAddressTransactionsTable = () => { const { data } = useTransactionDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx index a524fed198..ba4573a6bb 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue.tsx @@ -1,5 +1,6 @@ -import { formatHMTDecimals } from '@/helpers/formatHMTDecimals'; import Typography from '@mui/material/Typography'; + +import { formatHMTDecimals } from '@/helpers/formatHMTDecimals'; import { useHMTPrice } from '@/services/api/use-hmt-price'; export const TransactionTableCellValue = ({ value }: { value: string }) => { diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx index bdbd20bca1..d18d563748 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBody.tsx @@ -1,23 +1,24 @@ import React, { useEffect, useState } from 'react'; -import TableRow from '@mui/material/TableRow'; -import TableCell from '@mui/material/TableCell'; -import MuiTableBody from '@mui/material/TableBody'; -import Box from '@mui/material/Box'; -import IconButton from '@mui/material/IconButton'; -import CircularProgress from '@mui/material/CircularProgress'; + import AddCircleIcon from '@mui/icons-material/AddCircle'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import RemoveCircleIcon from '@mui/icons-material/RemoveCircle'; -import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; -import { colorPalette } from '@/assets/styles/color-palette'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import IconButton from '@mui/material/IconButton'; +import MuiTableBody from '@mui/material/TableBody'; +import TableCell from '@mui/material/TableCell'; +import TableRow from '@mui/material/TableRow'; +import { colorPalette } from '@/assets/styles/color-palette'; +import AbbreviateClipboard from '@/components/SearchResults/AbbreviateClipboard'; import { TransactionTableCellMethod } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellMethod'; import { TransactionTableCellValue } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/cells/TransactionTableCellValue'; -import { useTransactionDetails } from '@/services/api/use-transaction-details'; import { TransactionsTableBodyContainer } from '@/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer'; +import { useTransactionDetails } from '@/services/api/use-transaction-details'; import { handleErrorMessage } from '@/services/handle-error-message'; -import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; export const TransactionsTableBody: React.FC = () => { const { data, isPending, isError, error } = useTransactionDetails(); diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer.tsx index 04d9275011..ea5a84943b 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableBodyContainer.tsx @@ -1,5 +1,5 @@ -import MuiTableBody from '@mui/material/TableBody'; import { Grid } from '@mui/material'; +import MuiTableBody from '@mui/material/TableBody'; export const TransactionsTableBodyContainer = ({ children, diff --git a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx index 7f4f4545e8..a79db1170f 100644 --- a/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx +++ b/packages/apps/dashboard/client/src/pages/SearchResults/WalletAddress/WalletAddressTransactions/tableComponents/TransactionsTableHead.tsx @@ -1,9 +1,9 @@ -import Typography from '@mui/material/Typography'; +import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Stack from '@mui/material/Stack'; +import TableCell from '@mui/material/TableCell'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; -import TableCell from '@mui/material/TableCell'; -import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; +import Typography from '@mui/material/Typography'; import CustomTooltip from '@/components/CustomTooltip'; diff --git a/packages/apps/dashboard/client/src/services/api/use-address-details.tsx b/packages/apps/dashboard/client/src/services/api/use-address-details.tsx index 2a8c45a444..b708093de2 100644 --- a/packages/apps/dashboard/client/src/services/api/use-address-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-address-details.tsx @@ -1,11 +1,14 @@ +import { Role } from '@human-protocol/sdk'; import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; + +import { reputationSchema } from '@/services/api/use-leaderboard-details'; import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; import { validateResponse } from '../validate-response'; -import { reputationSchema } from '@/services/api/use-leaderboard-details'; -import { Role } from '@human-protocol/sdk'; + const transformOptionalTokenAmount = ( value: string | undefined | null, diff --git a/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx b/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx index 692f78ff00..8a0ac01e07 100644 --- a/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-escrows-details.tsx @@ -1,11 +1,13 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; -import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + +import { AddressDetailsOperator } from '@/services/api/use-address-details'; import { validateResponse } from '@/services/validate-response'; import { useEscrowDetailsDto } from '@/utils/hooks/use-escrows-details-dto'; -import { AddressDetailsOperator } from '@/services/api/use-address-details'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; const escrowDetailsSuccessResponseSchema = z.object({ chainId: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx b/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx index fe4e624ab3..e087a7a97e 100644 --- a/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-general-stats.tsx @@ -1,9 +1,11 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; + import { validateResponse } from '@/services/validate-response'; +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; + const successGeneralStatsResponseSchema = z.object({ totalHolders: z.number(), totalTransactions: z.number(), diff --git a/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx b/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx index f588b10c80..63032aaf65 100644 --- a/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-graph-page-chart-data.tsx @@ -1,12 +1,15 @@ +import { useMemo } from 'react'; + import { useQuery, keepPreviousData } from '@tanstack/react-query'; +import dayjs from 'dayjs'; +import { useDebounce } from 'use-debounce'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; + import { validateResponse } from '@/services/validate-response'; import { useGraphPageChartParams } from '@/utils/hooks/use-graph-page-chart-params'; -import { useDebounce } from 'use-debounce'; -import { useMemo } from 'react'; -import dayjs from 'dayjs'; + +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; const hmtDailyStatSchemaResponseSchema = z.object({ from: z.string().optional(), diff --git a/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx b/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx index 8979b59706..c3427cdeeb 100644 --- a/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-hmt-price.tsx @@ -1,9 +1,11 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; + import { validateResponse } from '@/services/validate-response'; +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; + const successHMTPriceResponseSchema = z.object({ hmtPrice: z.number(), }); diff --git a/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx b/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx index 6c1b3bd37f..bbc26e77f0 100644 --- a/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-kvstore-data.tsx @@ -1,9 +1,9 @@ import { useQuery } from '@tanstack/react-query'; +import { z } from 'zod'; import { apiPaths } from '@/services/api-paths'; import { httpService } from '@/services/http-service'; import { validateResponse } from '@/services/validate-response'; -import { z } from 'zod'; import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; const kvstoreDataSchema = z.array( diff --git a/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx b/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx index a44a6a1e63..37919661ba 100644 --- a/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-leaderboard-details.tsx @@ -1,10 +1,12 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; + import { validateResponse } from '@/services/validate-response'; import { useLeaderboardSearch } from '@/utils/hooks/use-leaderboard-search'; +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; + export const reputationSchema = z.unknown().transform((value) => { try { const knownReputation = z diff --git a/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx b/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx index 177a189962..b4f2fe453c 100644 --- a/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx +++ b/packages/apps/dashboard/client/src/services/api/use-transaction-details.tsx @@ -1,10 +1,12 @@ import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { httpService } from '../http-service'; -import { apiPaths } from '../api-paths'; -import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; -import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; + import { validateResponse } from '@/services/validate-response'; +import { useTransactionDetailsDto } from '@/utils/hooks/use-transactions-details-dto'; +import { useWalletSearch } from '@/utils/hooks/use-wallet-search'; + +import { apiPaths } from '../api-paths'; +import { httpService } from '../http-service'; const internalTransactionSchema = z.object({ from: z.string(), diff --git a/packages/apps/dashboard/client/src/services/global.type.ts b/packages/apps/dashboard/client/src/services/global.type.ts index 0555a1e485..8046969074 100644 --- a/packages/apps/dashboard/client/src/services/global.type.ts +++ b/packages/apps/dashboard/client/src/services/global.type.ts @@ -1,5 +1,5 @@ -import type { ZodError } from 'zod'; import type { AxiosError } from 'axios'; +import type { ZodError } from 'zod'; export type ResponseError = AxiosError | Error | ZodError | null; diff --git a/packages/apps/dashboard/client/src/services/http-service.ts b/packages/apps/dashboard/client/src/services/http-service.ts index 3795426495..92fbd08e36 100644 --- a/packages/apps/dashboard/client/src/services/http-service.ts +++ b/packages/apps/dashboard/client/src/services/http-service.ts @@ -1,4 +1,5 @@ import axios from 'axios'; + import { env } from '../helpers/env'; export const httpService = axios.create({ diff --git a/packages/apps/dashboard/client/src/theme.tsx b/packages/apps/dashboard/client/src/theme.tsx index 6ecdf76fc9..33447e4e9c 100644 --- a/packages/apps/dashboard/client/src/theme.tsx +++ b/packages/apps/dashboard/client/src/theme.tsx @@ -1,11 +1,14 @@ +import { CSSProperties } from 'react'; + +import { Shadows, ThemeOptions } from '@mui/material'; import { createTheme } from '@mui/material/styles'; import { PaletteColorOptions, PaletteColor, } from '@mui/material/styles/createPalette'; -import { Shadows, ThemeOptions } from '@mui/material'; + import { colorPalette } from '@/assets/styles/color-palette'; -import { CSSProperties } from 'react'; + declare module '@mui/material/Typography' { interface TypographyPropsVariantOverrides { diff --git a/packages/apps/dashboard/client/src/utils/config/networks.ts b/packages/apps/dashboard/client/src/utils/config/networks.ts index de55e0aa7a..05d80ebb58 100644 --- a/packages/apps/dashboard/client/src/utils/config/networks.ts +++ b/packages/apps/dashboard/client/src/utils/config/networks.ts @@ -1,5 +1,6 @@ import type { Chain } from 'viem/chains'; import * as chains from 'viem/chains'; + import { env } from '@/helpers/env'; //TODO: temporal fix. Should be fetched from API. https://github.com/humanprotocol/human-protocol/issues/2855 diff --git a/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts b/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts index 78013d408c..3cc624434e 100644 --- a/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts +++ b/packages/apps/dashboard/client/src/utils/hooks/use-filtered-networks.ts @@ -1,9 +1,11 @@ +import { useMemo } from 'react'; + import { useQuery } from '@tanstack/react-query'; import { z } from 'zod'; -import { networks as allNetworks } from '@/utils/config/networks'; -import { httpService } from '@/services/http-service'; + import { apiPaths } from '@/services/api-paths'; -import { useMemo } from 'react'; +import { httpService } from '@/services/http-service'; +import { networks as allNetworks } from '@/utils/config/networks'; const enabledChainsSchema = z.array(z.number()); diff --git a/packages/apps/dashboard/client/vite.config.ts b/packages/apps/dashboard/client/vite.config.ts index 1c9c63c387..7ff2b356c4 100644 --- a/packages/apps/dashboard/client/vite.config.ts +++ b/packages/apps/dashboard/client/vite.config.ts @@ -1,8 +1,9 @@ -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; import * as path from 'path'; -import svgr from 'vite-plugin-svgr'; + +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; import { nodePolyfills } from 'vite-plugin-node-polyfills'; +import svgr from 'vite-plugin-svgr'; // https://vitejs.dev/config/ export default defineConfig({ From a4ff8a3146fe97a990f4fc1511eee9b0401330b7 Mon Sep 17 00:00:00 2001 From: kirill Date: Tue, 3 Jun 2025 13:39:23 +0300 Subject: [PATCH 5/8] feat: add lint-staged --- packages/apps/dashboard/client/package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/apps/dashboard/client/package.json b/packages/apps/dashboard/client/package.json index 788ac2d53d..b0d75fd3a2 100644 --- a/packages/apps/dashboard/client/package.json +++ b/packages/apps/dashboard/client/package.json @@ -64,5 +64,11 @@ "typescript-eslint": "^8.33.0", "vite": "^6.2.4", "vite-plugin-svgr": "^4.2.0" + }, + "lint-staged": { + "*.{ts,tsx}": [ + "prettier --write", + "eslint --fix" + ] } } From a10b3de1582d5ee0501f6ee594cf45d9c9dc9c0e Mon Sep 17 00:00:00 2001 From: kirill Date: Tue, 3 Jun 2025 16:37:37 +0300 Subject: [PATCH 6/8] refactor: eslint config and ts config per feedback --- packages/apps/dashboard/client/eslint.config.js | 3 ++- packages/apps/dashboard/client/tsconfig.json | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js index 2d13e39d57..7694170740 100644 --- a/packages/apps/dashboard/client/eslint.config.js +++ b/packages/apps/dashboard/client/eslint.config.js @@ -8,7 +8,7 @@ import globals from 'globals'; export default [ { - ignores: ['dist/**', 'node_modules/**'], + ignores: ['dist/', 'tsconfig.json'], }, eslint.configs.recommended, ...tseslint.configs.recommended, @@ -22,6 +22,7 @@ export default [ ecmaFeatures: { jsx: true, }, + projectService: true, }, globals: { ...globals.browser, diff --git a/packages/apps/dashboard/client/tsconfig.json b/packages/apps/dashboard/client/tsconfig.json index e664d9ef23..e3e56d6ef4 100644 --- a/packages/apps/dashboard/client/tsconfig.json +++ b/packages/apps/dashboard/client/tsconfig.json @@ -24,6 +24,9 @@ "@/*": ["src/*"] } }, - "include": ["src"], - "exclude": ["./vite.config.ts"] + "include": [ + "src", + "vite.config.ts" + ], + "exclude": ["node_modules"] } From e44dad70010e097ce44e0b7c54587ffc601cc5a6 Mon Sep 17 00:00:00 2001 From: kirill Date: Tue, 3 Jun 2025 17:38:41 +0300 Subject: [PATCH 7/8] fix: replace with tseslint.config --- packages/apps/dashboard/client/eslint.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js index 7694170740..dcf3e17b34 100644 --- a/packages/apps/dashboard/client/eslint.config.js +++ b/packages/apps/dashboard/client/eslint.config.js @@ -6,12 +6,12 @@ import prettierPlugin from 'eslint-plugin-prettier'; import importPlugin from 'eslint-plugin-import'; import globals from 'globals'; -export default [ +export default tseslint.config( { ignores: ['dist/', 'tsconfig.json'], }, eslint.configs.recommended, - ...tseslint.configs.recommended, + tseslint.configs.recommended, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { @@ -96,4 +96,4 @@ export default [ ], }, } -]; +); From 1a81772f489e7a57b9fdd5141933906b23459562 Mon Sep 17 00:00:00 2001 From: kirill Date: Tue, 3 Jun 2025 17:45:35 +0300 Subject: [PATCH 8/8] bump eslint --- packages/apps/dashboard/client/package.json | 2 +- yarn.lock | 199 +++++++++++++++++++- 2 files changed, 195 insertions(+), 6 deletions(-) diff --git a/packages/apps/dashboard/client/package.json b/packages/apps/dashboard/client/package.json index b0d75fd3a2..d8349972ea 100644 --- a/packages/apps/dashboard/client/package.json +++ b/packages/apps/dashboard/client/package.json @@ -51,7 +51,7 @@ "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", "@vitejs/plugin-react": "^4.2.1", - "eslint": "^8.57.0", + "eslint": "^9.27.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.4.0", "eslint-plugin-react": "^7.37.5", diff --git a/yarn.lock b/yarn.lock index 20f551ce41..7dec0a18bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2698,13 +2698,40 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": +"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": version: 4.12.1 resolution: "@eslint-community/regexpp@npm:4.12.1" checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 languageName: node linkType: hard +"@eslint/config-array@npm:^0.20.0": + version: 0.20.0 + resolution: "@eslint/config-array@npm:0.20.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.6" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10c0/94bc5d0abb96dc5295ff559925242ff75a54eacfb3576677e95917e42f7175e1c4b87bf039aa2a872f949b4852ad9724bf2f7529aaea6b98f28bb3fca7f1d659 + languageName: node + linkType: hard + +"@eslint/config-helpers@npm:^0.2.1": + version: 0.2.2 + resolution: "@eslint/config-helpers@npm:0.2.2" + checksum: 10c0/98f7cefe484bb754674585d9e73cf1414a3ab4fd0783c385465288d13eb1a8d8e7d7b0611259fc52b76b396c11a13517be5036d1f48eeb877f6f0a6b9c4f03ad + languageName: node + linkType: hard + +"@eslint/core@npm:^0.14.0": + version: 0.14.0 + resolution: "@eslint/core@npm:0.14.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10c0/259f279445834ba2d2cbcc18e9d43202a4011fde22f29d5fb802181d66e0f6f0bd1f6b4b4b46663451f545d35134498231bd5e656e18d9034a457824b92b7741 + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/eslintrc@npm:2.1.4" @@ -2722,6 +2749,23 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^3.3.1": + version: 3.3.1 + resolution: "@eslint/eslintrc@npm:3.3.1" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10c0/b0e63f3bc5cce4555f791a4e487bf999173fcf27c65e1ab6e7d63634d8a43b33c3693e79f192cbff486d7df1be8ebb2bd2edc6e70ddd486cbfa84a359a3e3b41 + languageName: node + linkType: hard + "@eslint/js@npm:8.57.1": version: 8.57.1 resolution: "@eslint/js@npm:8.57.1" @@ -2729,13 +2773,30 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:^9.27.0": +"@eslint/js@npm:9.28.0, @eslint/js@npm:^9.27.0": version: 9.28.0 resolution: "@eslint/js@npm:9.28.0" checksum: 10c0/5a6759542490dd9f778993edfbc8d2f55168fd0f7336ceed20fe3870c65499d72fc0bca8d1ae00ea246b0923ea4cba2e0758a8a5507a3506ddcf41c92282abb8 languageName: node linkType: hard +"@eslint/object-schema@npm:^2.1.6": + version: 2.1.6 + resolution: "@eslint/object-schema@npm:2.1.6" + checksum: 10c0/b8cdb7edea5bc5f6a96173f8d768d3554a628327af536da2fc6967a93b040f2557114d98dbcdbf389d5a7b290985ad6a9ce5babc547f36fc1fde42e674d11a56 + languageName: node + linkType: hard + +"@eslint/plugin-kit@npm:^0.3.1": + version: 0.3.1 + resolution: "@eslint/plugin-kit@npm:0.3.1" + dependencies: + "@eslint/core": "npm:^0.14.0" + levn: "npm:^0.4.1" + checksum: 10c0/a75f0b5d38430318a551b83e27bee570747eb50beeb76b03f64b0e78c2c27ef3d284cfda3443134df028db3251719bc0850c105f778122f6ad762d5270ec8063 + languageName: node + linkType: hard + "@ethereumjs/common@npm:^3.2.0": version: 3.2.0 resolution: "@ethereumjs/common@npm:3.2.0" @@ -3858,7 +3919,7 @@ __metadata: axios: "npm:^1.7.2" clsx: "npm:^2.1.1" dayjs: "npm:^1.11.11" - eslint: "npm:^8.57.0" + eslint: "npm:^9.27.0" eslint-plugin-import: "npm:^2.31.0" eslint-plugin-prettier: "npm:^5.4.0" eslint-plugin-react: "npm:^7.37.5" @@ -4518,6 +4579,23 @@ __metadata: languageName: unknown linkType: soft +"@humanfs/core@npm:^0.19.1": + version: 0.19.1 + resolution: "@humanfs/core@npm:0.19.1" + checksum: 10c0/aa4e0152171c07879b458d0e8a704b8c3a89a8c0541726c6b65b81e84fd8b7564b5d6c633feadc6598307d34564bd53294b533491424e8e313d7ab6c7bc5dc67 + languageName: node + linkType: hard + +"@humanfs/node@npm:^0.16.6": + version: 0.16.6 + resolution: "@humanfs/node@npm:0.16.6" + dependencies: + "@humanfs/core": "npm:^0.19.1" + "@humanwhocodes/retry": "npm:^0.3.0" + checksum: 10c0/8356359c9f60108ec204cbd249ecd0356667359b2524886b357617c4a7c3b6aace0fd5a369f63747b926a762a88f8a25bc066fa1778508d110195ce7686243e1 + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.13.0": version: 0.13.0 resolution: "@humanwhocodes/config-array@npm:0.13.0" @@ -4543,6 +4621,20 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.1 + resolution: "@humanwhocodes/retry@npm:0.3.1" + checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.4.2": + version: 0.4.3 + resolution: "@humanwhocodes/retry@npm:0.4.3" + checksum: 10c0/3775bb30087d4440b3f7406d5a057777d90e4b9f435af488a4923ef249e93615fb78565a85f173a186a076c7706a81d0d57d563a2624e4de2c5c9c66c486ce42 + languageName: node + linkType: hard + "@inquirer/checkbox@npm:^4.1.5": version: 4.1.5 resolution: "@inquirer/checkbox@npm:4.1.5" @@ -9736,7 +9828,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db @@ -16419,6 +16511,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.3.0": + version: 8.3.0 + resolution: "eslint-scope@npm:8.3.0" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10c0/23bf54345573201fdf06d29efa345ab508b355492f6c6cc9e2b9f6d02b896f369b6dd5315205be94b8853809776c4d13353b85c6b531997b164ff6c3328ecf5b + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^2.1.0": version: 2.1.0 resolution: "eslint-visitor-keys@npm:2.1.0" @@ -16488,6 +16590,67 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^9.27.0": + version: 9.28.0 + resolution: "eslint@npm:9.28.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.20.0" + "@eslint/config-helpers": "npm:^0.2.1" + "@eslint/core": "npm:^0.14.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.28.0" + "@eslint/plugin-kit": "npm:^0.3.1" + "@humanfs/node": "npm:^0.16.6" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.6" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.3.0" + eslint-visitor-keys: "npm:^4.2.0" + espree: "npm:^10.3.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10c0/513ea7e69d88a0905d4ed35cef3a8f31ebce7ca9f2cdbda3474495c63ad6831d52357aad65094be7a144d6e51850980ced7d25efb807e8ab06a427241f7cd730 + languageName: node + linkType: hard + +"espree@npm:^10.0.1, espree@npm:^10.3.0": + version: 10.3.0 + resolution: "espree@npm:10.3.0" + dependencies: + acorn: "npm:^8.14.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.2.0" + checksum: 10c0/272beeaca70d0a1a047d61baff64db04664a33d7cfb5d144f84bc8a5c6194c6c8ebe9cc594093ca53add88baa23e59b01e69e8a0160ab32eac570482e165c462 + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -17227,6 +17390,15 @@ __metadata: languageName: node linkType: hard +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: "npm:^4.0.0" + checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 + languageName: node + linkType: hard + "file-saver@npm:^2.0.5": version: 2.0.5 resolution: "file-saver@npm:2.0.5" @@ -17354,6 +17526,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc + languageName: node + linkType: hard + "flat@npm:^5.0.2": version: 5.0.2 resolution: "flat@npm:5.0.2" @@ -17999,6 +18181,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d + languageName: node + linkType: hard + "globals@npm:^16.2.0": version: 16.2.0 resolution: "globals@npm:16.2.0" @@ -20753,7 +20942,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: