diff --git a/src/App.tsx b/src/App.tsx index 313ac55..f784dcc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,7 +13,7 @@ const { REACT_APP_CONFIG_SERVICE_URL, REACT_APP_SHOW_CONFIG_SERVICE_SELECTOR } = function App() { const [configServiceUrl, setConfigServiceUrl] = useState( - REACT_APP_CONFIG_SERVICE_URL || "" + REACT_APP_CONFIG_SERVICE_URL || "", ); const { theme, switchThemeMode, isDarkTheme } = useTheme(); diff --git a/src/api/getChainStatus.tsx b/src/api/getChainStatus.tsx index d259ca0..6fa8b18 100644 --- a/src/api/getChainStatus.tsx +++ b/src/api/getChainStatus.tsx @@ -6,7 +6,7 @@ const CHAIN_STATUS_PATHNAME = "/api/v1/about/indexing/"; async function getChainStatus( transactionServiceBaseUrl: string, - options?: RawAxiosRequestConfig + options?: RawAxiosRequestConfig, ): Promise { const endpoint = `${transactionServiceBaseUrl}${CHAIN_STATUS_PATHNAME}`; diff --git a/src/api/getChains.tsx b/src/api/getChains.tsx index 4ed04fd..f7e5e1f 100644 --- a/src/api/getChains.tsx +++ b/src/api/getChains.tsx @@ -6,7 +6,7 @@ const CHAINS_PATHNAME = "/api/v1/chains/"; async function getChains( configServiceBaseUrl: string, - options?: RawAxiosRequestConfig + options?: RawAxiosRequestConfig, ): Promise { const endpoint = `${configServiceBaseUrl}${CHAINS_PATHNAME}`; diff --git a/src/components/block-label/BlockLabel.tsx b/src/components/block-label/BlockLabel.tsx index 5ef9816..96ffb38 100644 --- a/src/components/block-label/BlockLabel.tsx +++ b/src/components/block-label/BlockLabel.tsx @@ -29,7 +29,7 @@ function BlockLabel({ // we build the block href from the tx template const blockExplorerHref = getBlockExplorerHref( blockExplorerUriTemplate.txHash, - blockNumber + blockNumber, ); // fetch block timestamp from getBlock diff --git a/src/components/chain-status-table/ChainStatusRow.tsx b/src/components/chain-status-table/ChainStatusRow.tsx index 76c50bb..03c3a57 100644 --- a/src/components/chain-status-table/ChainStatusRow.tsx +++ b/src/components/chain-status-table/ChainStatusRow.tsx @@ -25,7 +25,7 @@ function ChainStatusRow({ chain }: { chain: chain }) { signal, }); }, - [chain] + [chain], ); // fetch chain status with a polling (5 secs) @@ -48,7 +48,7 @@ function ChainStatusRow({ chain }: { chain: chain }) { return blockInfo; }, - [provider, chain] + [provider, chain], ); return ( diff --git a/src/components/chain-status-table/ChainStatusTable.tsx b/src/components/chain-status-table/ChainStatusTable.tsx index d6e3ed1..e1cf1d7 100644 --- a/src/components/chain-status-table/ChainStatusTable.tsx +++ b/src/components/chain-status-table/ChainStatusTable.tsx @@ -31,7 +31,7 @@ function ChainStatusTable({ configServiceUrl }: StatusTableProps) { } return Promise.resolve([]); }, - [configServiceUrl] + [configServiceUrl], ); const { isLoading, data: chains } = useApi(fetchChains); diff --git a/src/components/config-service-url-selector/ConfigServiceUrlSelector.tsx b/src/components/config-service-url-selector/ConfigServiceUrlSelector.tsx index f69a4cc..506d672 100644 --- a/src/components/config-service-url-selector/ConfigServiceUrlSelector.tsx +++ b/src/components/config-service-url-selector/ConfigServiceUrlSelector.tsx @@ -47,7 +47,7 @@ function ConfigServiceUrlSelector({ value={configServiceUrl} onChange={( event: SyntheticEvent, - option: string | optionsType | null + option: string | optionsType | null, ) => { const isStringValue = typeof option === "string"; const newValue = isStringValue ? option : option?.value; diff --git a/src/hooks/useApi.tsx b/src/hooks/useApi.tsx index 9f8b448..5cfcf1e 100644 --- a/src/hooks/useApi.tsx +++ b/src/hooks/useApi.tsx @@ -9,7 +9,7 @@ type useApiHookReturnValue = { function useApi( apiCall: apiCallParam, - pollingTime?: number + pollingTime?: number, ): useApiHookReturnValue { const [isLoading, setIsLoading] = useState(true); const [data, setData] = useState(); diff --git a/src/hooks/useLocalStorageState.tsx b/src/hooks/useLocalStorageState.tsx index 7742707..bae4c30 100644 --- a/src/hooks/useLocalStorageState.tsx +++ b/src/hooks/useLocalStorageState.tsx @@ -2,15 +2,15 @@ import { useEffect, useState } from "react"; type useLocalStorageStateReturnType = [ value: T, - setValue: React.Dispatch> + setValue: React.Dispatch>, ]; function useLocalStorageState( key: string, - initialValue: T + initialValue: T, ): useLocalStorageStateReturnType { const reactState = useState( - () => (localStorage.getItem(key) as T) || initialValue + () => (localStorage.getItem(key) as T) || initialValue, ); const [value] = reactState; diff --git a/src/hooks/useTheme.tsx b/src/hooks/useTheme.tsx index 09c5075..206cac2 100644 --- a/src/hooks/useTheme.tsx +++ b/src/hooks/useTheme.tsx @@ -17,7 +17,7 @@ const STORAGE_KEY_THEME_MODE = "THEME_MODE_REACT_SERVICE_STATUS_KEY"; function useTheme(): useThemeReturnValue { const [themeMode, setThemeMode] = useLocalStorageState( STORAGE_KEY_THEME_MODE, // key - DARK_THEME // initial value + DARK_THEME, // initial value ); const switchThemeMode = useCallback(() => { diff --git a/src/index.tsx b/src/index.tsx index 46348be..7135285 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2,7 +2,7 @@ import ReactDOM from "react-dom/client"; import App from "src/App"; const root = ReactDOM.createRoot( - document.getElementById("root") as HTMLElement + document.getElementById("root") as HTMLElement, ); root.render(); diff --git a/src/theme/theme.ts b/src/theme/theme.ts index 9000933..24963ae 100644 --- a/src/theme/theme.ts +++ b/src/theme/theme.ts @@ -43,7 +43,7 @@ const getTheme = (themeMode: PaletteMode): Theme => { }, }, }, - }) + }), ); }; diff --git a/src/utils/getBlockExplorerHref.ts b/src/utils/getBlockExplorerHref.ts index 78864ed..19a2fe9 100644 --- a/src/utils/getBlockExplorerHref.ts +++ b/src/utils/getBlockExplorerHref.ts @@ -1,7 +1,7 @@ // we build the block template from the tx template function getBlockExplorerHref( blockExplorerTxTemplate: string, - blockNumber?: number + blockNumber?: number, ): string { const transactionTemplate = "/tx/{{txHash}}"; const blockTemplate = `/block/${blockNumber}`; diff --git a/src/utils/memoizedGetBlock.ts b/src/utils/memoizedGetBlock.ts index 44aefa1..5eede02 100644 --- a/src/utils/memoizedGetBlock.ts +++ b/src/utils/memoizedGetBlock.ts @@ -18,7 +18,7 @@ const THRESHOLD_CLEAN_CACHE_TIME = 20 * 60 * 1000; // purge block cache each 20 async function memoizedGetBlock( blockNumber: number, provider: ethers.providers.JsonRpcProvider, - chainId: string + chainId: string, ): returnBlockInfoType { // we clean the cache each 20 mins if (Date.now() > lastTimeCleaned + THRESHOLD_CLEAN_CACHE_TIME) {