Commit b215ee95 authored by tom's avatar tom

import order rule

parent 345004aa
...@@ -19,6 +19,7 @@ module.exports = { ...@@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint', '@typescript-eslint',
'react-hooks', 'react-hooks',
'jsx-a11y', 'jsx-a11y',
'eslint-plugin-import-helpers',
], ],
parser: '@typescript-eslint/parser', parser: '@typescript-eslint/parser',
parserOptions: { parserOptions: {
...@@ -180,6 +181,20 @@ module.exports = { ...@@ -180,6 +181,20 @@ module.exports = {
'wrap-iife': [ 'error', 'inside' ], 'wrap-iife': [ 'error', 'inside' ],
semi: [ 'error', 'always' ], semi: [ 'error', 'always' ],
'import-helpers/order-imports': [
'error',
{
newlinesBetween: 'always',
groups: [
'module',
'/types/',
[ '/^data/', '/^icons/', '/^lib/', '/^pages/', '/^theme/', '/^ui/' ],
[ 'parent', 'sibling', 'index' ],
],
alphabetize: { order: 'asc', ignoreCase: true },
},
],
'react/jsx-key': 'error', 'react/jsx-key': 'error',
'react/jsx-no-bind': [ 'error', { 'react/jsx-no-bind': [ 'error', {
ignoreRefs: true, ignoreRefs: true,
......
import React, { useState } from 'react';
import type { AppProps } from 'next/app';
import { ChakraProvider } from '@chakra-ui/react'; import { ChakraProvider } from '@chakra-ui/react';
import theme from 'theme';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type { AppProps } from 'next/app';
import React, { useState } from 'react';
import theme from 'theme';
function MyApp({ Component, pageProps }: AppProps) { function MyApp({ Component, pageProps }: AppProps) {
const [ queryClient ] = useState(() => new QueryClient({ const [ queryClient ] = useState(() => new QueryClient({
......
import React from 'react';
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { ColorModeScript } from '@chakra-ui/react'; import { ColorModeScript } from '@chakra-ui/react';
import Document, { Html, Head, Main, NextScript } from 'next/document';
import React from 'react';
import theme from 'theme'; import theme from 'theme';
class MyDocument extends Document { class MyDocument extends Document {
......
import React from 'react';
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import Head from 'next/head'; import Head from 'next/head';
import React from 'react';
import ApiKeys from 'ui/pages/ApiKeys'; import ApiKeys from 'ui/pages/ApiKeys';
......
import handler from 'pages/api/utils/handler';
import type { AddressTags } from 'pages/api/types/account'; import type { AddressTags } from 'pages/api/types/account';
import handler from 'pages/api/utils/handler';
const addressHandler = handler<AddressTags>(() => '/account/v1/user/tags/address', [ 'GET', 'POST' ]); const addressHandler = handler<AddressTags>(() => '/account/v1/user/tags/address', [ 'GET', 'POST' ]);
export default addressHandler; export default addressHandler;
import handler from 'pages/api/utils/handler';
import type { TransactionTags } from 'pages/api/types/account'; import type { TransactionTags } from 'pages/api/types/account';
import handler from 'pages/api/utils/handler';
const transactionHandler = handler<TransactionTags>(() => '/account/v1/user/tags/transaction', [ 'GET', 'POST' ]); const transactionHandler = handler<TransactionTags>(() => '/account/v1/user/tags/transaction', [ 'GET', 'POST' ]);
export default transactionHandler; export default transactionHandler;
import React from 'react';
import type { NextPage } from 'next';
import { Center } from '@chakra-ui/react'; import { Center } from '@chakra-ui/react';
import type { NextPage } from 'next';
import React from 'react';
import Page from 'ui/shared/Page/Page'; import Page from 'ui/shared/Page/Page';
const Home: NextPage = () => { const Home: NextPage = () => {
......
import React, { useCallback, useState } from 'react'; import { useQuery } from '@tanstack/react-query';
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import Head from 'next/head'; import Head from 'next/head';
import React, { useCallback, useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import PrivateTags from 'ui/pages/PrivateTags'; import PrivateTags from 'ui/pages/PrivateTags';
......
import React from 'react';
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import Head from 'next/head'; import Head from 'next/head';
import React from 'react';
import PublicTags from 'ui/pages/PublicTags'; import PublicTags from 'ui/pages/PublicTags';
......
import React from 'react';
import type { NextPage } from 'next'; import type { NextPage } from 'next';
import Head from 'next/head'; import Head from 'next/head';
import React from 'react';
import WatchList from 'ui/pages/Watchlist'; import WatchList from 'ui/pages/Watchlist';
......
...@@ -3,6 +3,7 @@ import type { ComponentStyleConfig } from '@chakra-ui/theme'; ...@@ -3,6 +3,7 @@ import type { ComponentStyleConfig } from '@chakra-ui/theme';
import { getColor, mode } from '@chakra-ui/theme-tools'; import { getColor, mode } from '@chakra-ui/theme-tools';
import type { StyleFunctionProps, PartsStyleFunction } from '@chakra-ui/theme-tools'; import type { StyleFunctionProps, PartsStyleFunction } from '@chakra-ui/theme-tools';
import type { Dict } from '@chakra-ui/utils'; import type { Dict } from '@chakra-ui/utils';
import getDefaultFormColors from '../utils/getDefaultFormColors'; import getDefaultFormColors from '../utils/getDefaultFormColors';
const activeInputStyles = { const activeInputStyles = {
......
import type { inputAnatomy as parts } from '@chakra-ui/anatomy'; import type { inputAnatomy as parts } from '@chakra-ui/anatomy';
import { Input as InputComponent } from '@chakra-ui/react';
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import type { PartsStyleFunction, SystemStyleObject } from '@chakra-ui/theme-tools'; import type { PartsStyleFunction, SystemStyleObject } from '@chakra-ui/theme-tools';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import getDefaultTransitionProps from '../utils/getDefaultTransitionProps'; import getDefaultTransitionProps from '../utils/getDefaultTransitionProps';
import getOutlinedFieldStyles from '../utils/getOutlinedFieldStyles'; import getOutlinedFieldStyles from '../utils/getOutlinedFieldStyles';
import { Input as InputComponent } from '@chakra-ui/react';
const sizes: Record<string, SystemStyleObject> = { const sizes: Record<string, SystemStyleObject> = {
md: { md: {
fontSize: 'md', fontSize: 'md',
......
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import type { SystemStyleFunction, SystemStyleInterpolation } from '@chakra-ui/theme-tools'; import type { SystemStyleFunction, SystemStyleInterpolation } from '@chakra-ui/theme-tools';
import getDefaultTransitionProps from '../utils/getDefaultTransitionProps'; import getDefaultTransitionProps from '../utils/getDefaultTransitionProps';
const baseStyle: SystemStyleInterpolation = { const baseStyle: SystemStyleInterpolation = {
......
import { modalAnatomy as parts } from '@chakra-ui/anatomy'; import { modalAnatomy as parts } from '@chakra-ui/anatomy';
import type { ComponentMultiStyleConfig } from '@chakra-ui/theme';
import type { PartsStyleFunction, SystemStyleFunction } from '@chakra-ui/theme-tools'; import type { PartsStyleFunction, SystemStyleFunction } from '@chakra-ui/theme-tools';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import type { ComponentMultiStyleConfig } from '@chakra-ui/theme';
const baseStyleDialog: SystemStyleFunction = (props) => { const baseStyleDialog: SystemStyleFunction = (props) => {
return { return {
......
...@@ -2,6 +2,7 @@ import type { tableAnatomy as parts } from '@chakra-ui/anatomy'; ...@@ -2,6 +2,7 @@ import type { tableAnatomy as parts } from '@chakra-ui/anatomy';
import type { ComponentMultiStyleConfig } from '@chakra-ui/theme'; import type { ComponentMultiStyleConfig } from '@chakra-ui/theme';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import type { PartsStyleFunction } from '@chakra-ui/theme-tools'; import type { PartsStyleFunction } from '@chakra-ui/theme-tools';
import getDefaultTransitionProps from '../utils/getDefaultTransitionProps'; import getDefaultTransitionProps from '../utils/getDefaultTransitionProps';
const variantSimple: PartsStyleFunction<typeof parts> = (props) => { const variantSimple: PartsStyleFunction<typeof parts> = (props) => {
......
import type { tabsAnatomy as parts } from '@chakra-ui/anatomy';
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import type { import type {
PartsStyleFunction, PartsStyleFunction,
} from '@chakra-ui/theme-tools'; } from '@chakra-ui/theme-tools';
import { getColor } from '@chakra-ui/theme-tools'; import { getColor } from '@chakra-ui/theme-tools';
import type { tabsAnatomy as parts } from '@chakra-ui/anatomy';
const variantSoftRounded: PartsStyleFunction<typeof parts> = (props) => { const variantSoftRounded: PartsStyleFunction<typeof parts> = (props) => {
const { colorScheme: c, theme } = props; const { colorScheme: c, theme } = props;
return { return {
......
...@@ -2,6 +2,7 @@ import type { tagAnatomy as parts } from '@chakra-ui/anatomy'; ...@@ -2,6 +2,7 @@ import type { tagAnatomy as parts } from '@chakra-ui/anatomy';
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import type { PartsStyleFunction } from '@chakra-ui/theme-tools'; import type { PartsStyleFunction } from '@chakra-ui/theme-tools';
import getDefaultTransitionProps from '../utils/getDefaultTransitionProps'; import getDefaultTransitionProps from '../utils/getDefaultTransitionProps';
const variantGray: PartsStyleFunction<typeof parts> = (props) => { const variantGray: PartsStyleFunction<typeof parts> = (props) => {
......
import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
const variantSecondary: SystemStyleFunction = (props) => ({ const variantSecondary: SystemStyleFunction = (props) => ({
......
import { Textarea as TextareaComponent } from '@chakra-ui/react';
import type { ComponentStyleConfig } from '@chakra-ui/theme';
import type { import type {
SystemStyleObject, SystemStyleObject,
} from '@chakra-ui/theme-tools'; } from '@chakra-ui/theme-tools';
import type { ComponentStyleConfig } from '@chakra-ui/theme';
import getOutlinedFieldStyles from '../utils/getOutlinedFieldStyles'; import getOutlinedFieldStyles from '../utils/getOutlinedFieldStyles';
import { Textarea as TextareaComponent } from '@chakra-ui/react';
const sizes: Record<string, SystemStyleObject> = { const sizes: Record<string, SystemStyleObject> = {
lg: { lg: {
fontSize: 'md', fontSize: 'md',
......
import type { ComponentStyleConfig } from '@chakra-ui/theme';
import { Tooltip as TooltipComponent } from '@chakra-ui/react'; import { Tooltip as TooltipComponent } from '@chakra-ui/react';
import type { ComponentStyleConfig } from '@chakra-ui/theme';
const Tooltip: ComponentStyleConfig = { const Tooltip: ComponentStyleConfig = {
baseStyle: { baseStyle: {
......
import type { StyleFunctionProps } from '@chakra-ui/theme-tools'; import type { StyleFunctionProps } from '@chakra-ui/theme-tools';
import { mode } from '@chakra-ui/theme-tools'; import { mode } from '@chakra-ui/theme-tools';
import getDefaultTransitionProps from './utils/getDefaultTransitionProps'; import getDefaultTransitionProps from './utils/getDefaultTransitionProps';
const global = (props: StyleFunctionProps) => ({ const global = (props: StyleFunctionProps) => ({
......
import { extendTheme } from '@chakra-ui/react'; import { extendTheme } from '@chakra-ui/react';
import typography from './foundations/typography';
import borders from './foundations/borders';
import colors from './foundations/colors';
import components from './components/index'; import components from './components/index';
import config from './config'; import config from './config';
import borders from './foundations/borders';
import colors from './foundations/colors';
import typography from './foundations/typography';
import global from './global'; import global from './global';
const overrides = { const overrides = {
......
import type { StyleFunctionProps } from '@chakra-ui/theme-tools'; import type { StyleFunctionProps } from '@chakra-ui/theme-tools';
import { mode, getColor } from '@chakra-ui/theme-tools'; import { mode, getColor } from '@chakra-ui/theme-tools';
import getDefaultFormColors from './getDefaultFormColors'; import getDefaultFormColors from './getDefaultFormColors';
import getDefaultTransitionProps from './getDefaultTransitionProps'; import getDefaultTransitionProps from './getDefaultTransitionProps';
......
import React, { useCallback, useEffect } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import { import {
Box, Box,
Button, Button,
...@@ -9,6 +5,9 @@ import { ...@@ -9,6 +5,9 @@ import {
FormLabel, FormLabel,
Input, Input,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback, useEffect } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import type { TApiKeyItem } from 'data/apiKey'; import type { TApiKeyItem } from 'data/apiKey';
......
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { TApiKeyItem } from 'data/apiKey'; import type { TApiKeyItem } from 'data/apiKey';
import FormModal from 'ui/shared/FormModal';
import ApiKeyForm from './ApiKeyForm'; import ApiKeyForm from './ApiKeyForm';
import FormModal from 'ui/shared/FormModal';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
......
import React from 'react';
import { import {
Table, Table,
Thead, Thead,
...@@ -8,6 +6,7 @@ import { ...@@ -8,6 +6,7 @@ import {
Th, Th,
TableContainer, TableContainer,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { TApiKey, TApiKeyItem } from 'data/apiKey'; import type { TApiKey, TApiKeyItem } from 'data/apiKey';
......
import React, { useCallback } from 'react';
import { import {
Tr, Tr,
Td, Td,
HStack, HStack,
Text, Text,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import EditButton from 'ui/shared/EditButton';
import DeleteButton from 'ui/shared/DeleteButton';
import type { TApiKeyItem } from 'data/apiKey'; import type { TApiKeyItem } from 'data/apiKey';
import CopyToClipboard from 'ui/shared/CopyToClipboard'; import CopyToClipboard from 'ui/shared/CopyToClipboard';
import DeleteButton from 'ui/shared/DeleteButton';
import EditButton from 'ui/shared/EditButton';
interface Props { interface Props {
item: TApiKeyItem; item: TApiKeyItem;
......
import React, { useCallback } from 'react';
import { Text } from '@chakra-ui/react'; import { Text } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import DeleteModal from 'ui/shared/DeleteModal'; import DeleteModal from 'ui/shared/DeleteModal';
type Props = { type Props = {
......
import type { UseCheckboxProps } from '@chakra-ui/checkbox'; import type { UseCheckboxProps } from '@chakra-ui/checkbox';
import { useCheckbox } from '@chakra-ui/checkbox'; import { useCheckbox } from '@chakra-ui/checkbox';
import { SunIcon } from '@chakra-ui/icons';
import { useColorMode, useColorModeValue, Icon } from '@chakra-ui/react';
import type { import type {
SystemStyleObject, SystemStyleObject,
ThemingProps, ThemingProps,
...@@ -12,11 +14,9 @@ import { ...@@ -12,11 +14,9 @@ import {
} from '@chakra-ui/system'; } from '@chakra-ui/system';
import { dataAttr, __DEV__ } from '@chakra-ui/utils'; import { dataAttr, __DEV__ } from '@chakra-ui/utils';
import * as React from 'react'; import * as React from 'react';
import { SunIcon } from '@chakra-ui/icons';
import { useColorMode, useColorModeValue, Icon } from '@chakra-ui/react';
import getDefaultTransitionProps from '../../theme/utils/getDefaultTransitionProps';
import moonIcon from '../../icons/moon.svg';
import moonIcon from '../../icons/moon.svg';
import getDefaultTransitionProps from '../../theme/utils/getDefaultTransitionProps';
import styles from './ColorModeToggler.module.css'; import styles from './ColorModeToggler.module.css';
export interface ColorModeTogglerProps export interface ColorModeTogglerProps
......
import React from 'react';
import { HStack, InputGroup, Input, InputLeftAddon, InputLeftElement, Center, useColorModeValue } from '@chakra-ui/react';
import { SearchIcon } from '@chakra-ui/icons'; import { SearchIcon } from '@chakra-ui/icons';
import { HStack, InputGroup, Input, InputLeftAddon, InputLeftElement, Center, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import Identicon from 'react-identicons'; import Identicon from 'react-identicons';
import { ColorModeToggler } from './ColorModeToggler';
import { ColorModeToggler } from './ColorModeToggler';
import styles from './Header.module.css'; import styles from './Header.module.css';
const Header = () => { const Header = () => {
......
import React from 'react';
import { Link, Icon, Text, HStack } from '@chakra-ui/react'; import { Link, Icon, Text, HStack } from '@chakra-ui/react';
import NextLink from 'next/link'; import NextLink from 'next/link';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import React from 'react';
import useColors from './useColors'; import useColors from './useColors';
interface Props { interface Props {
......
import React from 'react';
import { Box, VStack } from '@chakra-ui/react'; import { Box, VStack } from '@chakra-ui/react';
import AccountNavLink from './AccountNavLink'; import React from 'react';
import WatchlistIcon from 'icons/watchlist.svg';
import ABIIcon from 'icons/ABI.svg';
import ApiKeysIcon from 'icons/API.svg';
import PrivateTagIcon from 'icons/privattags.svg'; import PrivateTagIcon from 'icons/privattags.svg';
import PublicTagIcon from 'icons/publictags.svg'; import PublicTagIcon from 'icons/publictags.svg';
import ApiKeysIcon from 'icons/API.svg'; import WatchlistIcon from 'icons/watchlist.svg';
import ABIIcon from 'icons/ABI.svg';
import AccountNavLink from './AccountNavLink';
const navItems = [ const navItems = [
{ text: 'Watchlist', pathname: '/watchlist', icon: WatchlistIcon }, { text: 'Watchlist', pathname: '/watchlist', icon: WatchlistIcon },
......
import React from 'react'; import { ChevronRightIcon } from '@chakra-ui/icons';
import { Link, Icon, Text, HStack } from '@chakra-ui/react'; import { Link, Icon, Text, HStack } from '@chakra-ui/react';
import NextLink from 'next/link'; import NextLink from 'next/link';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
import { ChevronRightIcon } from '@chakra-ui/icons'; import React from 'react';
import useColors from './useColors'; import useColors from './useColors';
interface Props { interface Props {
......
import React from 'react';
import { Box, VStack } from '@chakra-ui/react'; import { Box, VStack } from '@chakra-ui/react';
import MainNavLink from './MainNavLink'; import React from 'react';
import BlocksIcon from 'icons/block.svg';
import TransactionsIcon from 'icons/transactions.svg';
import TokensIcon from 'icons/token.svg';
import AppsIcon from 'icons/apps.svg'; import AppsIcon from 'icons/apps.svg';
import BlocksIcon from 'icons/block.svg';
import BlockscoutIcon from 'icons/blockscout.svg'; import BlockscoutIcon from 'icons/blockscout.svg';
import TokensIcon from 'icons/token.svg';
import TransactionsIcon from 'icons/transactions.svg';
import MainNavLink from './MainNavLink';
const navItems = [ const navItems = [
{ text: 'Blocks', pathname: '/blocks', icon: BlocksIcon }, { text: 'Blocks', pathname: '/blocks', icon: BlocksIcon },
......
import React from 'react';
import { VStack, Text, HStack, Icon, Link, useColorModeValue } from '@chakra-ui/react'; import { VStack, Text, HStack, Icon, Link, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import getDefaultTransitionProps from 'theme/utils/getDefaultTransitionProps';
import ghIcon from 'icons/social/git.svg'; import ghIcon from 'icons/social/git.svg';
import twIcon from 'icons/social/tweet.svg';
import tgIcon from 'icons/social/telega.svg';
import statsIcon from 'icons/social/stats.svg'; import statsIcon from 'icons/social/stats.svg';
import tgIcon from 'icons/social/telega.svg';
import twIcon from 'icons/social/tweet.svg';
import getDefaultTransitionProps from 'theme/utils/getDefaultTransitionProps';
const SOCIAL_LINKS = [ const SOCIAL_LINKS = [
{ link: '#gh', icon: ghIcon }, { link: '#gh', icon: ghIcon },
......
import React from 'react';
import { VStack, HStack, Icon, useColorModeValue } from '@chakra-ui/react'; import { VStack, HStack, Icon, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import AccountNavigation from './AccountNavigation';
import MainNavigation from './MainNavigation';
import NavFooter from './NavFooter';
import logoIcon from 'icons/logo.svg'; import logoIcon from 'icons/logo.svg';
import networksIcon from 'icons/networks.svg'; import networksIcon from 'icons/networks.svg';
import getDefaultTransitionProps from '../../theme/utils/getDefaultTransitionProps'; import getDefaultTransitionProps from '../../theme/utils/getDefaultTransitionProps';
import AccountNavigation from './AccountNavigation';
import MainNavigation from './MainNavigation';
import NavFooter from './NavFooter';
const Navigation = () => { const Navigation = () => {
return ( return (
......
import React, { useCallback, useState } from 'react';
import { Box, Button, HStack, Link, Text, useDisclosure } from '@chakra-ui/react'; import { Box, Button, HStack, Link, Text, useDisclosure } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react';
import Page from 'ui/shared/Page/Page';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import ApiKeyTable from 'ui/apiKey/ApiKeyTable/ApiKeyTable';
import ApiKeyModal from 'ui/apiKey/ApiKeyModal/ApiKeyModal';
import DeleteApiKeyModal from 'ui/apiKey/DeleteApiKeyModal';
import type { TApiKeyItem } from 'data/apiKey'; import type { TApiKeyItem } from 'data/apiKey';
import { apiKey } from 'data/apiKey'; import { apiKey } from 'data/apiKey';
import { space } from 'lib/html-entities'; import { space } from 'lib/html-entities';
import ApiKeyModal from 'ui/apiKey/ApiKeyModal/ApiKeyModal';
import ApiKeyTable from 'ui/apiKey/ApiKeyTable/ApiKeyTable';
import DeleteApiKeyModal from 'ui/apiKey/DeleteApiKeyModal';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import Page from 'ui/shared/Page/Page';
const DATA_LIMIT = 3; const DATA_LIMIT = 3;
......
import React, { useCallback } from 'react';
import { useQueryClient } from '@tanstack/react-query';
import type { AddressTags, TransactionTags } from 'types/api/account';
import { import {
Box, Box,
Tab, Tab,
...@@ -11,11 +6,15 @@ import { ...@@ -11,11 +6,15 @@ import {
TabPanel, TabPanel,
TabPanels, TabPanels,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { useQueryClient } from '@tanstack/react-query';
import React, { useCallback } from 'react';
import type { AddressTags, TransactionTags } from 'types/api/account';
import Page from 'ui/shared/Page/Page';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import PrivateAddressTags from 'ui/privateTags/PrivateAddressTags'; import PrivateAddressTags from 'ui/privateTags/PrivateAddressTags';
import PrivateTransactionTags from 'ui/privateTags/PrivateTransactionTags'; import PrivateTransactionTags from 'ui/privateTags/PrivateTransactionTags';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import Page from 'ui/shared/Page/Page';
type Props = { type Props = {
onChangeTab: (index: number) => void; onChangeTab: (index: number) => void;
......
import React, { useCallback, useState } from 'react';
import { animateScroll } from 'react-scroll';
import { import {
Box, Box,
useToast, useToast,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react';
import { animateScroll } from 'react-scroll';
import Page from 'ui/shared/Page/Page'; import type { TPublicTagItem } from 'data/publicTags';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import PublicTagsData from 'ui/publicTags/PublicTagsData'; import PublicTagsData from 'ui/publicTags/PublicTagsData';
import PublicTagsForm from 'ui/publicTags/PublicTagsForm/PublicTagsForm'; import PublicTagsForm from 'ui/publicTags/PublicTagsForm/PublicTagsForm';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import type { TPublicTagItem } from 'data/publicTags'; import Page from 'ui/shared/Page/Page';
type TScreen = 'data' | 'form'; type TScreen = 'data' | 'form';
......
import React, { useCallback, useState } from 'react';
import { Box, Button, Text, useDisclosure } from '@chakra-ui/react'; import { Box, Button, Text, useDisclosure } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react';
import Page from 'ui/shared/Page/Page';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import WatchlistTable from 'ui/watchlist/WatchlistTable/WatchlistTable';
import AddressModal from 'ui/watchlist/AddressModal/AddressModal';
import type { TWatchlistItem } from 'data/watchlist'; import type { TWatchlistItem } from 'data/watchlist';
import { watchlist } from 'data/watchlist'; import { watchlist } from 'data/watchlist';
import AccountPageHeader from 'ui/shared/AccountPageHeader';
import Page from 'ui/shared/Page/Page';
import AddressModal from 'ui/watchlist/AddressModal/AddressModal';
import DeleteAddressModal from 'ui/watchlist/DeleteAddressModal'; import DeleteAddressModal from 'ui/watchlist/DeleteAddressModal';
import WatchlistTable from 'ui/watchlist/WatchlistTable/WatchlistTable';
const WatchList: React.FC = () => { const WatchList: React.FC = () => {
const addressModalProps = useDisclosure(); const addressModalProps = useDisclosure();
......
import React, { useCallback, useEffect, useState } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { import {
Box, Box,
Button, Button,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import React, { useCallback, useEffect, useState } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import type { AddressTag } from 'types/api/account';
import AddressInput from 'ui/shared/AddressInput'; import AddressInput from 'ui/shared/AddressInput';
import TagInput from 'ui/shared/TagInput'; import TagInput from 'ui/shared/TagInput';
import type { AddressTag } from 'types/api/account';
const ADDRESS_LENGTH = 42; const ADDRESS_LENGTH = 42;
const TAG_MAX_LENGTH = 35; const TAG_MAX_LENGTH = 35;
......
...@@ -2,9 +2,10 @@ import React, { useCallback } from 'react'; ...@@ -2,9 +2,10 @@ import React, { useCallback } from 'react';
import type { AddressTag } from 'types/api/account'; import type { AddressTag } from 'types/api/account';
import AddressForm from './AddressForm';
import FormModal from 'ui/shared/FormModal'; import FormModal from 'ui/shared/FormModal';
import AddressForm from './AddressForm';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
onClose: () => void; onClose: () => void;
......
import React from 'react';
import { import {
Table, Table,
Thead, Thead,
...@@ -8,6 +6,7 @@ import { ...@@ -8,6 +6,7 @@ import {
Th, Th,
TableContainer, TableContainer,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { AddressTags, AddressTag } from 'types/api/account'; import type { AddressTags, AddressTag } from 'types/api/account';
......
import React, { useCallback } from 'react';
import { import {
Tag, Tag,
Tr, Tr,
Td, Td,
HStack, HStack,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import type { AddressTag } from 'types/api/account';
import AddressIcon from 'ui/shared/AddressIcon'; import AddressIcon from 'ui/shared/AddressIcon';
import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip'; import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip';
import type { AddressTag } from 'types/api/account';
import EditButton from 'ui/shared/EditButton';
import DeleteButton from 'ui/shared/DeleteButton'; import DeleteButton from 'ui/shared/DeleteButton';
import EditButton from 'ui/shared/EditButton';
import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip'; import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip';
interface Props { interface Props {
......
import React, { useCallback, useState } from 'react';
import { Text } from '@chakra-ui/react'; import { Text } from '@chakra-ui/react';
import DeleteModal from 'ui/shared/DeleteModal';
import { useMutation, useQueryClient } from '@tanstack/react-query'; import { useMutation, useQueryClient } from '@tanstack/react-query';
import React, { useCallback, useState } from 'react';
import type { AddressTag, TransactionTag } from 'types/api/account'; import type { AddressTag, TransactionTag } from 'types/api/account';
import DeleteModal from 'ui/shared/DeleteModal';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
onClose: () => void; onClose: () => void;
......
import { Box, Button, Spinner, Text, useDisclosure } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import { Box, Button, Spinner, Text, useDisclosure } from '@chakra-ui/react'; import type { AddressTags, AddressTag } from 'types/api/account';
import AddressTagTable from './AddressTagTable/AddressTagTable';
import AddressModal from './AddressModal/AddressModal'; import AddressModal from './AddressModal/AddressModal';
import AddressTagTable from './AddressTagTable/AddressTagTable';
import DeletePrivateTagModal from './DeletePrivateTagModal'; import DeletePrivateTagModal from './DeletePrivateTagModal';
import type { AddressTags, AddressTag } from 'types/api/account';
type Props = { type Props = {
addressTags: AddressTags; addressTags: AddressTags;
......
import React, { useCallback, useState } from 'react';
import { Box, Button, Text, useDisclosure } from '@chakra-ui/react'; import { Box, Button, Text, useDisclosure } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react';
import type { TransactionTags, TransactionTag } from 'types/api/account'; import type { TransactionTags, TransactionTag } from 'types/api/account';
import TransactionTagTable from './TransactionTagTable/TransactionTagTable';
import TransactionModal from './TransactionModal/TransactionModal';
import DeletePrivateTagModal from './DeletePrivateTagModal'; import DeletePrivateTagModal from './DeletePrivateTagModal';
import TransactionModal from './TransactionModal/TransactionModal';
import TransactionTagTable from './TransactionTagTable/TransactionTagTable';
type Props = { type Props = {
transactionTags: TransactionTags; transactionTags: TransactionTags;
......
import {
Box,
Button,
} from '@chakra-ui/react';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import React, { useCallback, useEffect, useState } from 'react'; import React, { useCallback, useEffect, useState } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form'; import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form'; import { useForm, Controller } from 'react-hook-form';
import type { TransactionTag } from 'types/api/account'; import type { TransactionTag } from 'types/api/account';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import {
Box,
Button,
} from '@chakra-ui/react';
import TransactionInput from 'ui/shared/TransactionInput';
import TagInput from 'ui/shared/TagInput'; import TagInput from 'ui/shared/TagInput';
import TransactionInput from 'ui/shared/TransactionInput';
const HASH_LENGTH = 66; const HASH_LENGTH = 66;
const TAG_MAX_LENGTH = 35; const TAG_MAX_LENGTH = 35;
......
...@@ -2,9 +2,10 @@ import React, { useCallback } from 'react'; ...@@ -2,9 +2,10 @@ import React, { useCallback } from 'react';
import type { TransactionTag } from 'types/api/account'; import type { TransactionTag } from 'types/api/account';
import TransactionForm from './TransactionForm';
import FormModal from 'ui/shared/FormModal'; import FormModal from 'ui/shared/FormModal';
import TransactionForm from './TransactionForm';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
onClose: () => void; onClose: () => void;
......
import React from 'react';
import type { TransactionTags, TransactionTag } from 'types/api/account';
import { import {
Table, Table,
Thead, Thead,
...@@ -10,6 +6,9 @@ import { ...@@ -10,6 +6,9 @@ import {
Th, Th,
TableContainer, TableContainer,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { TransactionTags, TransactionTag } from 'types/api/account';
import TransactionTagTableItem from './TransactionTagTableItem'; import TransactionTagTableItem from './TransactionTagTableItem';
......
import React, { useCallback } from 'react';
import { import {
Tag, Tag,
Tr, Tr,
...@@ -7,13 +5,13 @@ import { ...@@ -7,13 +5,13 @@ import {
HStack, HStack,
Tooltip, Tooltip,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import EditButton from 'ui/shared/EditButton'; import type { TransactionTag } from 'types/api/account';
import DeleteButton from 'ui/shared/DeleteButton';
import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip'; import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip';
import DeleteButton from 'ui/shared/DeleteButton';
import type { TransactionTag } from 'types/api/account'; import EditButton from 'ui/shared/EditButton';
interface Props { interface Props {
item: TransactionTag; item: TransactionTag;
......
import { Flex, Text, FormControl, FormLabel, Textarea } from '@chakra-ui/react';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import type { ChangeEvent } from 'react'; import type { ChangeEvent } from 'react';
import { Flex, Text, FormControl, FormLabel, Textarea } from '@chakra-ui/react';
import DeleteModal from 'ui/shared/DeleteModal';
import type { TPublicTag } from 'data/publicTags'; import type { TPublicTag } from 'data/publicTags';
import DeleteModal from 'ui/shared/DeleteModal';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
......
import React from 'react';
import { import {
Table, Table,
Thead, Thead,
...@@ -8,6 +6,7 @@ import { ...@@ -8,6 +6,7 @@ import {
Th, Th,
TableContainer, TableContainer,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { TPublicTagItem, TPublicTags } from 'data/publicTags'; import type { TPublicTagItem, TPublicTags } from 'data/publicTags';
......
import React, { useCallback } from 'react';
import { import {
Box, Box,
Tag, Tag,
...@@ -10,14 +8,14 @@ import { ...@@ -10,14 +8,14 @@ import {
VStack, VStack,
useColorModeValue, useColorModeValue,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import type { TPublicTagItem, TPublicTagAddress, TPublicTag } from 'data/publicTags';
import AddressIcon from 'ui/shared/AddressIcon'; import AddressIcon from 'ui/shared/AddressIcon';
import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip'; import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip';
import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip';
import type { TPublicTagItem, TPublicTagAddress, TPublicTag } from 'data/publicTags';
import EditButton from 'ui/shared/EditButton';
import DeleteButton from 'ui/shared/DeleteButton'; import DeleteButton from 'ui/shared/DeleteButton';
import EditButton from 'ui/shared/EditButton';
import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip';
interface Props { interface Props {
item: TPublicTagItem; item: TPublicTagItem;
......
...@@ -3,8 +3,9 @@ import React, { useCallback, useState } from 'react'; ...@@ -3,8 +3,9 @@ import React, { useCallback, useState } from 'react';
import type { TPublicTagItem, TPublicTag } from 'data/publicTags'; import type { TPublicTagItem, TPublicTag } from 'data/publicTags';
import { publicTags } from 'data/publicTags'; import { publicTags } from 'data/publicTags';
import PublicTagTable from './PublicTagTable/PublicTagTable';
import DeletePublicTagModal from './DeletePublicTagModal'; import DeletePublicTagModal from './DeletePublicTagModal';
import PublicTagTable from './PublicTagTable/PublicTagTable';
type Props = { type Props = {
changeToFormScreen: (data?: TPublicTagItem) => void; changeToFormScreen: (data?: TPublicTagItem) => void;
......
import { RadioGroup, Radio, Stack } from '@chakra-ui/react';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { ControllerRenderProps, Control } from 'react-hook-form'; import type { ControllerRenderProps, Control } from 'react-hook-form';
import { RadioGroup, Radio, Stack } from '@chakra-ui/react';
import { Controller } from 'react-hook-form'; import { Controller } from 'react-hook-form';
import type { Inputs } from './PublicTagsForm'; import type { Inputs } from './PublicTagsForm';
interface Props { interface Props {
......
import { IconButton, Icon } from '@chakra-ui/react';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { ControllerRenderProps, Control } from 'react-hook-form'; import type { ControllerRenderProps, Control } from 'react-hook-form';
import { IconButton, Icon } from '@chakra-ui/react';
import { Controller } from 'react-hook-form'; import { Controller } from 'react-hook-form';
import type { Inputs } from './PublicTagsForm';
import AddressInput from 'ui/shared/AddressInput';
import PlusIcon from 'icons/plus.svg';
import MinusIcon from 'icons/minus.svg'; import MinusIcon from 'icons/minus.svg';
import PlusIcon from 'icons/plus.svg';
import AddressInput from 'ui/shared/AddressInput';
import type { Inputs } from './PublicTagsForm';
interface Props { interface Props {
control: Control<Inputs>; control: Control<Inputs>;
......
import { FormControl, FormLabel, Textarea } from '@chakra-ui/react';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { ControllerRenderProps, Control } from 'react-hook-form'; import type { ControllerRenderProps, Control } from 'react-hook-form';
import { FormControl, FormLabel, Textarea } from '@chakra-ui/react';
import { Controller } from 'react-hook-form'; import { Controller } from 'react-hook-form';
import type { Inputs } from './PublicTagsForm'; import type { Inputs } from './PublicTagsForm';
interface Props { interface Props {
......
...@@ -7,16 +7,15 @@ import { ...@@ -7,16 +7,15 @@ import {
HStack, HStack,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { TPublicTagItem, TPublicTag, TPublicTagAddress } from 'data/publicTags';
import type { Path } from 'react-hook-form'; import type { Path } from 'react-hook-form';
import { useForm, useFieldArray } from 'react-hook-form'; import { useForm, useFieldArray } from 'react-hook-form';
import type { TPublicTagItem, TPublicTag, TPublicTagAddress } from 'data/publicTags';
import PublicTagFormAction from './PublicTagFormAction'; import PublicTagFormAction from './PublicTagFormAction';
import PublicTagFormAddressInput from './PublicTagFormAddressInput';
import PublicTagFormComment from './PublicTagFormComment'; import PublicTagFormComment from './PublicTagFormComment';
import PublicTagsFormInput from './PublicTagsFormInput'; import PublicTagsFormInput from './PublicTagsFormInput';
import PublicTagFormAddressInput from './PublicTagFormAddressInput';
type Props = { type Props = {
changeToDataScreen: (success?: boolean) => void; changeToDataScreen: (success?: boolean) => void;
......
import { FormControl, FormLabel, Input } from '@chakra-ui/react';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { ControllerRenderProps, FieldValues, Path, Control } from 'react-hook-form'; import type { ControllerRenderProps, FieldValues, Path, Control } from 'react-hook-form';
import { FormControl, FormLabel, Input } from '@chakra-ui/react';
import { Controller } from 'react-hook-form'; import { Controller } from 'react-hook-form';
interface Props<TInputs extends FieldValues> { interface Props<TInputs extends FieldValues> {
......
import React from 'react';
import { Heading } from '@chakra-ui/react'; import { Heading } from '@chakra-ui/react';
import React from 'react';
const PageHeader = ({ text }: {text: string}) => { const PageHeader = ({ text }: {text: string}) => {
return ( return (
......
import { Box } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import Jazzicon, { jsNumberForAddress } from 'react-jazzicon'; import Jazzicon, { jsNumberForAddress } from 'react-jazzicon';
import { Box } from '@chakra-ui/react';
const AddressIcon = ({ address }: {address: string}) => { const AddressIcon = ({ address }: {address: string}) => {
return ( return (
......
import React from 'react';
import type { ControllerRenderProps, FieldValues, Path } from 'react-hook-form';
import { import {
Input, Input,
FormControl, FormControl,
FormLabel, FormLabel,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { ControllerRenderProps, FieldValues, Path } from 'react-hook-form';
const ADDRESS_LENGTH = 42; const ADDRESS_LENGTH = 42;
......
import React from 'react';
import { HStack, Link } from '@chakra-ui/react'; import { HStack, Link } from '@chakra-ui/react';
import React from 'react';
import AddressWithDots from './AddressWithDots'; import AddressWithDots from './AddressWithDots';
import CopyToClipboard from './CopyToClipboard'; import CopyToClipboard from './CopyToClipboard';
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
// so i did it with js // so i did it with js
import React, { useCallback, useEffect, useRef } from 'react';
import { Tooltip } from '@chakra-ui/react'; import { Tooltip } from '@chakra-ui/react';
import _debounce from 'lodash/debounce'; import _debounce from 'lodash/debounce';
import React, { useCallback, useEffect, useRef } from 'react';
import type { FontFace } from 'use-font-face-observer'; import type { FontFace } from 'use-font-face-observer';
import useFontFaceObserver from 'use-font-face-observer'; import useFontFaceObserver from 'use-font-face-observer';
import { BODY_TYPEFACE } from 'theme/foundations/typography'; import { BODY_TYPEFACE } from 'theme/foundations/typography';
const TAIL_LENGTH = 4; const TAIL_LENGTH = 4;
......
import { IconButton, Tooltip, useClipboard } from '@chakra-ui/react';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { IconButton, Tooltip, useClipboard } from '@chakra-ui/react';
import CopyIcon from 'icons/copy.svg'; import CopyIcon from 'icons/copy.svg';
const CopyToClipboard = ({ text }: {text: string}) => { const CopyToClipboard = ({ text }: {text: string}) => {
......
import React, { useCallback } from 'react';
import { Tooltip, IconButton, Icon } from '@chakra-ui/react'; import { Tooltip, IconButton, Icon } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import DeleteIcon from 'icons/delete.svg'; import DeleteIcon from 'icons/delete.svg';
......
import React, { useCallback } from 'react';
import { import {
Button, Button,
Modal, Modal,
...@@ -10,6 +8,7 @@ import { ...@@ -10,6 +8,7 @@ import {
ModalBody, ModalBody,
ModalCloseButton, ModalCloseButton,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
......
import React, { useCallback } from 'react';
import { Tooltip, IconButton, Icon } from '@chakra-ui/react'; import { Tooltip, IconButton, Icon } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import EditIcon from 'icons/edit.svg'; import EditIcon from 'icons/edit.svg';
......
import React from 'react';
import { import {
Modal, Modal,
ModalOverlay, ModalOverlay,
...@@ -9,6 +7,7 @@ import { ...@@ -9,6 +7,7 @@ import {
ModalCloseButton, ModalCloseButton,
Text, Text,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
interface Props<TData> { interface Props<TData> {
isOpen: boolean; isOpen: boolean;
......
import React from 'react';
import { Box, HStack, VStack } from '@chakra-ui/react'; import { Box, HStack, VStack } from '@chakra-ui/react';
import React from 'react';
import Navigation from 'ui/navigation/Navigation';
import Header from 'ui/header/Header'; import Header from 'ui/header/Header';
import Navigation from 'ui/navigation/Navigation';
interface Props { interface Props {
children: React.ReactNode; children: React.ReactNode;
......
import React from 'react';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
import { import {
Input, Input,
FormControl, FormControl,
FormLabel, FormLabel,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
const TAG_MAX_LENGTH = 35; const TAG_MAX_LENGTH = 35;
......
import React from 'react';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
import { import {
Input, Input,
FormControl, FormControl,
FormLabel, FormLabel,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { ControllerRenderProps, FieldValues } from 'react-hook-form';
const HASH_LENGTH = 66; const HASH_LENGTH = 66;
......
import React from 'react';
import { Tooltip } from '@chakra-ui/react'; import { Tooltip } from '@chakra-ui/react';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import React from 'react';
import useFontFaceObserver from 'use-font-face-observer'; import useFontFaceObserver from 'use-font-face-observer';
import { BODY_TYPEFACE } from 'theme/foundations/typography'; import { BODY_TYPEFACE } from 'theme/foundations/typography';
interface Props { interface Props {
......
import React, { useCallback, useEffect } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import { import {
Box, Box,
Button, Button,
...@@ -10,12 +6,14 @@ import { ...@@ -10,12 +6,14 @@ import {
Grid, Grid,
GridItem, GridItem,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback, useEffect } from 'react';
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import type { TWatchlistItem } from 'data/watchlist';
import AddressInput from 'ui/shared/AddressInput'; import AddressInput from 'ui/shared/AddressInput';
import TagInput from 'ui/shared/TagInput'; import TagInput from 'ui/shared/TagInput';
import type { TWatchlistItem } from 'data/watchlist';
const NOTIFICATIONS = [ 'xDAI', 'ERC-20', 'ERC-721, ERC-1155 (NFT)' ]; const NOTIFICATIONS = [ 'xDAI', 'ERC-20', 'ERC-721, ERC-1155 (NFT)' ];
const ADDRESS_LENGTH = 42; const ADDRESS_LENGTH = 42;
const TAG_MAX_LENGTH = 35; const TAG_MAX_LENGTH = 35;
......
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import type { TWatchlistItem } from 'data/watchlist'; import type { TWatchlistItem } from 'data/watchlist';
import FormModal from 'ui/shared/FormModal';
import AddressForm from './AddressForm'; import AddressForm from './AddressForm';
import FormModal from 'ui/shared/FormModal';
type Props = { type Props = {
isOpen: boolean; isOpen: boolean;
......
import React, { useCallback } from 'react';
import { Text } from '@chakra-ui/react'; import { Text } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import DeleteModal from 'ui/shared/DeleteModal'; import DeleteModal from 'ui/shared/DeleteModal';
type Props = { type Props = {
......
import React from 'react';
import { Link, HStack, VStack, Image, Text, Icon, useColorModeValue } from '@chakra-ui/react'; import { Link, HStack, VStack, Image, Text, Icon, useColorModeValue } from '@chakra-ui/react';
import React from 'react';
import AddressIcon from 'ui/shared/AddressIcon';
import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip';
import type { TWatchlistItem } from 'data/watchlist'; import type { TWatchlistItem } from 'data/watchlist';
import { nbsp } from 'lib/html-entities';
import TokensIcon from 'icons/tokens.svg'; import TokensIcon from 'icons/tokens.svg';
import WalletIcon from 'icons/wallet.svg'; import WalletIcon from 'icons/wallet.svg';
import { nbsp } from 'lib/html-entities';
import AddressIcon from 'ui/shared/AddressIcon';
import AddressLinkWithTooltip from 'ui/shared/AddressLinkWithTooltip';
const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => { const WatchListAddressItem = ({ item }: {item: TWatchlistItem}) => {
const mainTextColor = useColorModeValue('gray.700', 'gray.50'); const mainTextColor = useColorModeValue('gray.700', 'gray.50');
......
import React, { useCallback } from 'react';
import { import {
Tag, Tag,
Tr, Tr,
...@@ -7,13 +5,13 @@ import { ...@@ -7,13 +5,13 @@ import {
Switch, Switch,
HStack, HStack,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import EditButton from 'ui/shared/EditButton'; import type { TWatchlistItem } from 'data/watchlist';
import DeleteButton from 'ui/shared/DeleteButton'; import DeleteButton from 'ui/shared/DeleteButton';
import EditButton from 'ui/shared/EditButton';
import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip'; import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip';
import type { TWatchlistItem } from 'data/watchlist';
import WatchListAddressItem from './WatchListAddressItem'; import WatchListAddressItem from './WatchListAddressItem';
interface Props { interface Props {
......
import React from 'react';
import { import {
Table, Table,
Thead, Thead,
...@@ -8,6 +6,7 @@ import { ...@@ -8,6 +6,7 @@ import {
Th, Th,
TableContainer, TableContainer,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react';
import type { TWatchlist, TWatchlistItem } from 'data/watchlist'; import type { TWatchlist, TWatchlistItem } from 'data/watchlist';
......
...@@ -1625,6 +1625,11 @@ eslint-plugin-es5@^1.5.0: ...@@ -1625,6 +1625,11 @@ eslint-plugin-es5@^1.5.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-es5/-/eslint-plugin-es5-1.5.0.tgz#aab19af3d4798f7924bba309bc4f87087280fbba" resolved "https://registry.yarnpkg.com/eslint-plugin-es5/-/eslint-plugin-es5-1.5.0.tgz#aab19af3d4798f7924bba309bc4f87087280fbba"
integrity sha512-Qxmfo7v2B7SGAEURJo0dpBweFf+JU15kSyALfiB2rXWcBuJ96r6X9kFHXFnhdopPHCaHjoQs1xQPUJVbGMb1AA== integrity sha512-Qxmfo7v2B7SGAEURJo0dpBweFf+JU15kSyALfiB2rXWcBuJ96r6X9kFHXFnhdopPHCaHjoQs1xQPUJVbGMb1AA==
eslint-plugin-import-helpers@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-import-helpers/-/eslint-plugin-import-helpers-1.2.1.tgz#22c7ac66c964e8257b2a6fb4aff8a51b35cbdc6d"
integrity sha512-BSqLlCnyX4tWGlvPUTpBgUoaFiWxXSztpk9SozZVW4TZU1ygZuF0Lrfn9CO5xx1XT+PVAR9yroP9JPRyB4rAjQ==
eslint-plugin-import@^2.26.0: eslint-plugin-import@^2.26.0:
version "2.26.0" version "2.26.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment