File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react'
22import { Preview } from '@storybook/react'
33import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
44import '../src/locales/i18n'
5- import { withDefaultTheme } from '../src/app/components/ThemeByNetwork '
5+ import { withDefaultTheme } from '../src/app/components/ThemeByScope '
66import { initialize , mswLoader } from 'msw-storybook-addon'
77import { QueryClient , QueryClientProvider } from '@tanstack/react-query'
88import { handlers } from '../internals/mocks/msw-handlers'
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import Button from '@mui/material/Button'
66import Link from '@mui/material/Link'
77import { Trans , useTranslation } from 'react-i18next'
88import * as matomo from './initializeMatomo'
9- import { ThemeByNetwork } from '../ThemeByNetwork '
9+ import { ThemeByScope } from '../ThemeByScope '
1010import { Network } from '../../../types/network'
1111import { AnalyticsIsBlocked } from './AnalyticsIsBlocked'
1212import { AnalyticsDialogLayout } from './AnalyticsDialogLayout'
@@ -63,7 +63,7 @@ export const AnalyticsConsentProvider = (props: { children: React.ReactNode }) =
6363 >
6464 { props . children }
6565 { /* Theme is needed because AnalyticsConsentProvider is outside network-themed routes */ }
66- < ThemeByNetwork isRootTheme = { false } network = { Network . mainnet } >
66+ < ThemeByScope isRootTheme = { false } network = { Network . mainnet } >
6767 < AnalyticsConsentView
6868 isOpen = { hasAccepted === 'not-chosen' }
6969 onAccept = { async ( ) => {
@@ -80,7 +80,7 @@ export const AnalyticsConsentProvider = (props: { children: React.ReactNode }) =
8080 onReload = { ( ) => window . location . reload ( ) }
8181 onClose = { ( ) => setHasAccepted ( 'timed_out_matomo_not_loaded' ) }
8282 />
83- </ ThemeByNetwork >
83+ </ ThemeByScope >
8484 </ AnalyticsContext . Provider >
8585 )
8686}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { getThemesForNetworks } from '../../../styles/theme'
55import CssBaseline from '@mui/material/CssBaseline'
66import { fixedNetwork } from '../../utils/route-utils'
77
8- export const ThemeByNetwork : FC < { network : Network ; isRootTheme : boolean ; children : React . ReactNode } > = ( {
8+ export const ThemeByScope : FC < { network : Network ; isRootTheme : boolean ; children : React . ReactNode } > = ( {
99 network,
1010 isRootTheme,
1111 children,
@@ -17,10 +17,10 @@ export const ThemeByNetwork: FC<{ network: Network; isRootTheme: boolean; childr
1717)
1818
1919export const withDefaultTheme = ( node : ReactNode , alwaysMainnet = false ) => (
20- < ThemeByNetwork
20+ < ThemeByScope
2121 isRootTheme = { true }
2222 network = { alwaysMainnet ? Network . mainnet : fixedNetwork ?? Network . mainnet }
2323 >
2424 { node }
25- </ ThemeByNetwork >
25+ </ ThemeByScope >
2626)
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next'
1414import { ParaTimeSelectorStep } from './Graph/types'
1515import { BuildBanner } from '../../components/BuildBanner'
1616import { useSearchQueryNetworkParam } from '../../hooks/useSearchQueryNetworkParam'
17- import { ThemeByNetwork } from '../../components/ThemeByNetwork '
17+ import { ThemeByScope } from '../../components/ThemeByScope '
1818import { NetworkOfflineBanner } from '../../components/OfflineBanner'
1919import { useIsApiReachable } from '../../components/OfflineBanner/hook'
2020
@@ -168,7 +168,7 @@ export const HomePage: FC = () => {
168168 </ InfoScreenBtn >
169169 ) }
170170 </ SearchInputContainer >
171- < ThemeByNetwork isRootTheme = { false } network = { network } >
171+ < ThemeByScope isRootTheme = { false } network = { network } >
172172 < Box sx = { { zIndex : zIndexHomePage . paraTimeSelector } } >
173173 < ParaTimeSelector
174174 step = { step }
@@ -179,7 +179,7 @@ export const HomePage: FC = () => {
179179 onGraphZoomedIn = { setIsGraphZoomedIn }
180180 />
181181 </ Box >
182- </ ThemeByNetwork >
182+ </ ThemeByScope >
183183 </ Content >
184184
185185 < FooterStyled >
Original file line number Diff line number Diff line change @@ -3,18 +3,18 @@ import Divider from '@mui/material/Divider'
33import { PageLayout } from '../../components/PageLayout'
44import { ErrorDisplay } from '../../components/ErrorDisplay'
55import { useRouteError } from 'react-router-dom'
6- import { ThemeByNetwork } from '../../components/ThemeByNetwork '
6+ import { ThemeByScope } from '../../components/ThemeByScope '
77import { useScopeParam } from '../../hooks/useScopeParam'
88import { Network } from '../../../types/network'
99
1010export const RoutingErrorPage : FC = ( ) => {
1111 const scope = useScopeParam ( )
1212 return (
13- < ThemeByNetwork isRootTheme = { true } network = { scope ?. network ?? Network . mainnet } >
13+ < ThemeByScope isRootTheme = { true } network = { scope ?. network ?? Network . mainnet } >
1414 < PageLayout >
1515 < Divider variant = "layout" />
1616 < ErrorDisplay error = { useRouteError ( ) } />
1717 </ PageLayout >
18- </ ThemeByNetwork >
18+ </ ThemeByScope >
1919 )
2020}
Original file line number Diff line number Diff line change 11import { MemoryRouter } from 'react-router-dom'
22import { render } from '@testing-library/react'
3- import { withDefaultTheme } from '../components/ThemeByNetwork '
3+ import { withDefaultTheme } from '../components/ThemeByScope '
44import React from 'react'
55import { useIsApiReachable , useRuntimeFreshness } from '../components/OfflineBanner/hook'
66
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import {
2626 skipGraph ,
2727} from './app/utils/route-utils'
2828import { RoutingErrorPage } from './app/pages/RoutingErrorPage'
29- import { ThemeByNetwork , withDefaultTheme } from './app/components/ThemeByNetwork '
29+ import { ThemeByScope , withDefaultTheme } from './app/components/ThemeByScope '
3030import { useRequiredScopeParam } from './app/hooks/useScopeParam'
3131import { TokensPage } from './app/pages/TokensOverviewPage'
3232import { ContractCodeCard } from './app/pages/RuntimeAccountDetailsPage/ContractCodeCard'
@@ -60,9 +60,9 @@ import { FC, useEffect } from 'react'
6060import { AnalyticsConsentProvider } from './app/components/AnalyticsConsent'
6161
6262const NetworkSpecificPart = ( ) => (
63- < ThemeByNetwork isRootTheme = { true } network = { useRequiredScopeParam ( ) . network } >
63+ < ThemeByScope isRootTheme = { true } network = { useRequiredScopeParam ( ) . network } >
6464 < Outlet />
65- </ ThemeByNetwork >
65+ </ ThemeByScope >
6666)
6767
6868/**
You can’t perform that action at this time.
0 commit comments