diff --git a/protocol-dashboard/src/App.tsx b/protocol-dashboard/src/App.tsx index 39ea2b17738..f71ac0c6aac 100644 --- a/protocol-dashboard/src/App.tsx +++ b/protocol-dashboard/src/App.tsx @@ -3,7 +3,15 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import { useEffect, useState } from 'react' import { Provider, useSelector } from 'react-redux' -import { Routes, Route, HashRouter } from 'react-router-dom' +import { + Routes, + Route, + HashRouter, + Navigate, + useParams, + To, + NavigateProps +} from 'react-router-dom' import { ThemeProvider as HarmonyThemeProvider } from '@audius/harmony' import Header from 'components/Header' @@ -44,6 +52,20 @@ const Root = () => ( ) +type NavigateWithParamsParams = Omit & { + to: To | ((params: Record) => To) +} +const NavigateWithParams = ({ to, ...rest }: NavigateWithParamsParams) => { + const params = useParams() + let toValue: To + if (typeof to === 'function') { + toValue = to(params) + } else { + toValue = to + } + return +} + const App = () => { // If the client fails, set it to the backup client const [apolloClient, setApolloClient] = useState(client) @@ -69,47 +91,107 @@ const App = () => {
} /> - } /> + } /> } /> } /> } /> + routes.NODES_DISCOVERY_NODE.replace( + ':spID', + params.spID + ) + } + /> + } + /> + } /> } /> + } /> } + element={ + + routes.NODES_CONTENT_NODE.replace( + ':spID', + params.spID + ) + } + /> + } /> } /> + } /> + } /> } + path={routes.SERVICES_ACCOUNT_USER} + element={ + + routes.NODES_ACCOUNT_USER.replace( + ':wallet', + params.wallet + ) + } + /> + } /> } /> } + element={ + + routes.NODES_ACCOUNT_OPERATOR.replace( + ':wallet', + params.wallet + ) + } + /> + } /> + {Object.keys( + routes.SIMPLE_DEPRECATED_SERVICE_ROUTES_TO_NODES_ROUTES + ).map(old => ( + + } + /> + ))} } /> = ({ const pushRoute = usePushRoute() const onClickMore = useCallback(() => { - pushRoute(SERVICES_CONTENT) + pushRoute(NODES_CONTENT) }, [pushRoute]) const onRowClick = useCallback( diff --git a/protocol-dashboard/src/components/DiscoveryTable/DiscoveryTable.tsx b/protocol-dashboard/src/components/DiscoveryTable/DiscoveryTable.tsx index 0d83d867107..9a23b62d747 100644 --- a/protocol-dashboard/src/components/DiscoveryTable/DiscoveryTable.tsx +++ b/protocol-dashboard/src/components/DiscoveryTable/DiscoveryTable.tsx @@ -1,9 +1,9 @@ import React, { useCallback } from 'react' import { useDiscoveryProviders } from 'store/cache/discoveryProvider/hooks' -import { DiscoveryProvider, Address, Status } from 'types' -import { SERVICES_DISCOVERY_PROVIDER, discoveryNodePage } from 'utils/routes' +import { Address, DiscoveryProvider, Status } from 'types' import { usePushRoute } from 'utils/effects' +import { NODES_DISCOVERY, discoveryNodePage } from 'utils/routes' import ServiceTable from 'components/ServiceTable' @@ -30,7 +30,7 @@ const DiscoveryTable: React.FC = ({ const pushRoute = usePushRoute() const onClickMore = useCallback(() => { - pushRoute(SERVICES_DISCOVERY_PROVIDER) + pushRoute(NODES_DISCOVERY) }, [pushRoute]) const onRowClick = useCallback( diff --git a/protocol-dashboard/src/components/InfoTooltip/InfoTooltip.tsx b/protocol-dashboard/src/components/InfoTooltip/InfoTooltip.tsx index 619aad2811e..1b004bdd5bf 100644 --- a/protocol-dashboard/src/components/InfoTooltip/InfoTooltip.tsx +++ b/protocol-dashboard/src/components/InfoTooltip/InfoTooltip.tsx @@ -1,4 +1,4 @@ -import { IconColors, IconInfo } from '@audius/harmony' +import { IconColors, IconInfo, IconProps } from '@audius/harmony' import Tooltip from 'components/Tooltip' type InfoTooltipProps = { @@ -9,6 +9,22 @@ type InfoTooltipProps = { size?: 'default' | 'large' color?: IconColors } + +type TooltipIconProps = IconProps & { + isActive?: boolean +} +const TooltipIcon = ({ isActive, size, color }: TooltipIconProps) => { + return ( + + ) +} + export const InfoTooltip = ({ title, body, @@ -19,7 +35,7 @@ export const InfoTooltip = ({ }: InfoTooltipProps) => { return ( - + ) } diff --git a/protocol-dashboard/src/components/RegisterNodeCard/RegisterNodeCard.tsx b/protocol-dashboard/src/components/RegisterNodeCard/RegisterNodeCard.tsx index a2371cc1d8f..19ca262368c 100644 --- a/protocol-dashboard/src/components/RegisterNodeCard/RegisterNodeCard.tsx +++ b/protocol-dashboard/src/components/RegisterNodeCard/RegisterNodeCard.tsx @@ -18,7 +18,7 @@ export const RegisterNodeCard = () => { return ( { return ( - + {messages.rewardsTiming} diff --git a/protocol-dashboard/src/components/Tooltip/Tooltip.tsx b/protocol-dashboard/src/components/Tooltip/Tooltip.tsx index 75e40ed3ef7..8f5e96ec4e8 100644 --- a/protocol-dashboard/src/components/Tooltip/Tooltip.tsx +++ b/protocol-dashboard/src/components/Tooltip/Tooltip.tsx @@ -215,7 +215,12 @@ const BaseTooltip: React.FC = ({ onMouseLeave={() => setHover(false)} > {isHover ? ReactDOM.createPortal(tooltip, rootDomNode) : null} - {children} + {!isBasic && React.isValidElement(children) + ? React.cloneElement(children, { + // @ts-expect-error + isActive: isHover + }) + : children} ) } diff --git a/protocol-dashboard/src/components/TopAddressesTable/TopAddressesTable.tsx b/protocol-dashboard/src/components/TopAddressesTable/TopAddressesTable.tsx index 8e8d4315ef7..0c140171b32 100644 --- a/protocol-dashboard/src/components/TopAddressesTable/TopAddressesTable.tsx +++ b/protocol-dashboard/src/components/TopAddressesTable/TopAddressesTable.tsx @@ -2,7 +2,7 @@ import BN from 'bn.js' import clsx from 'clsx' import React, { useCallback } from 'react' import Audius from 'services/Audius' -import { SERVICES_USERS, accountPage } from 'utils/routes' +import { NODES_USERS, SERVICES_USERS, accountPage } from 'utils/routes' import Table from 'components/Table' import { formatWeight } from 'utils/format' @@ -49,7 +49,7 @@ const TopAddressesTable: React.FC = ({ const isMobile = useIsMobile() const pushRoute = usePushRoute() const onClickMore = useCallback(() => { - pushRoute(SERVICES_USERS) + pushRoute(NODES_USERS) }, [pushRoute]) const onRowClick = useCallback( diff --git a/protocol-dashboard/src/components/TopOperatorsTable/TopOperatorsTable.tsx b/protocol-dashboard/src/components/TopOperatorsTable/TopOperatorsTable.tsx index 7bfb840a2f5..b7f7c993c4b 100644 --- a/protocol-dashboard/src/components/TopOperatorsTable/TopOperatorsTable.tsx +++ b/protocol-dashboard/src/components/TopOperatorsTable/TopOperatorsTable.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx' import React, { useCallback } from 'react' -import { SERVICES_SERVICE_PROVIDERS, accountPage } from 'utils/routes' +import { NODES_SERVICE_PROVIDERS, accountPage } from 'utils/routes' import Table from 'components/Table' import styles from './TopOperatorsTable.module.css' @@ -47,7 +47,7 @@ const TopOperatorsTable: React.FC = ({ const isMobile = useIsMobile() const pushRoute = usePushRoute() const onClickMore = useCallback(() => { - pushRoute(SERVICES_SERVICE_PROVIDERS) + pushRoute(NODES_SERVICE_PROVIDERS) }, [pushRoute]) const onRowClick = useCallback( diff --git a/protocol-dashboard/src/containers/API/API.module.css b/protocol-dashboard/src/containers/API/API.module.css index 74ab2d042e0..c66ab596016 100644 --- a/protocol-dashboard/src/containers/API/API.module.css +++ b/protocol-dashboard/src/containers/API/API.module.css @@ -11,7 +11,7 @@ opacity: 1; height: 475px; z-index: -1; - background: url(../../assets/img/apiBanner@2x.png); + background: url(../../assets/img/apiBanner@2x.webp); background-position: center; background-size: cover; background-blend-mode: hard-light, multiply, overlay, normal; diff --git a/protocol-dashboard/src/containers/API/APIMobile.module.css b/protocol-dashboard/src/containers/API/APIMobile.module.css index d96ef8494bf..9b3f79a1cc8 100644 --- a/protocol-dashboard/src/containers/API/APIMobile.module.css +++ b/protocol-dashboard/src/containers/API/APIMobile.module.css @@ -10,7 +10,7 @@ opacity: 1; height: 210px; z-index: -1; - background: url(../../assets/img/apiBanner@2x.png); + background: url(../../assets/img/apiBanner.webp); background-position: center; background-size: cover; background-blend-mode: hard-light, multiply, overlay, normal; @@ -41,4 +41,4 @@ cursor: pointer; transform: scale3d(1, 1, 1); transition: all 0.07s ease-in-out; -} \ No newline at end of file +} diff --git a/protocol-dashboard/src/containers/ContentNodes/ContentNodes.tsx b/protocol-dashboard/src/containers/ContentNodes/ContentNodes.tsx index 007e611d19c..595ab551664 100644 --- a/protocol-dashboard/src/containers/ContentNodes/ContentNodes.tsx +++ b/protocol-dashboard/src/containers/ContentNodes/ContentNodes.tsx @@ -4,8 +4,8 @@ import { useEffect, useState } from 'react' import { useLocation } from 'react-router-dom' import { useReplaceRoute } from 'utils/effects' import { - SERVICES_CONTENT_NODE, - SERVICES_UNREGISTERED_CONTENT_NODE + NODES_CONTENT_NODE, + NODES_UNREGISTERED_CONTENT_NODE } from 'utils/routes' import styles from './ContentNodes.module.css' @@ -43,9 +43,9 @@ const ContentNodes = () => { let path = '' if (spId === 0) { - path = `${SERVICES_UNREGISTERED_CONTENT_NODE}?endpoint=${endpoint}` + path = `${NODES_UNREGISTERED_CONTENT_NODE}?endpoint=${endpoint}` } else { - path = SERVICES_CONTENT_NODE.replace(':spID', spId.toString()) + path = NODES_CONTENT_NODE.replace(':spID', spId.toString()) } replaceRoute(path) }, [spId, endpoint, replaceRoute]) diff --git a/protocol-dashboard/src/containers/DiscoveryProviders/DiscoveryProviders.tsx b/protocol-dashboard/src/containers/DiscoveryProviders/DiscoveryProviders.tsx index b8c6ccb115b..059c3221b10 100644 --- a/protocol-dashboard/src/containers/DiscoveryProviders/DiscoveryProviders.tsx +++ b/protocol-dashboard/src/containers/DiscoveryProviders/DiscoveryProviders.tsx @@ -4,8 +4,8 @@ import { useEffect, useState } from 'react' import { useLocation } from 'react-router-dom' import { useReplaceRoute } from 'utils/effects' import { - SERVICES_DISCOVERY_PROVIDER_NODE, - SERVICES_UNREGISTERED_DISCOVERY_NODE + NODES_DISCOVERY_NODE, + NODES_UNREGISTERED_DISCOVERY_NODE } from 'utils/routes' import styles from './DiscoveryProviders.module.css' @@ -43,9 +43,9 @@ const DiscoveryProviders = () => { let path = '' if (spId === 0) { - path = `${SERVICES_UNREGISTERED_DISCOVERY_NODE}?endpoint=${endpoint}` + path = `${NODES_UNREGISTERED_DISCOVERY_NODE}?endpoint=${endpoint}` } else { - path = SERVICES_DISCOVERY_PROVIDER_NODE.replace(':spID', spId.toString()) + path = NODES_DISCOVERY_NODE.replace(':spID', spId.toString()) } replaceRoute(path) }, [spId, endpoint, replaceRoute]) diff --git a/protocol-dashboard/src/containers/Home/Home.tsx b/protocol-dashboard/src/containers/Home/Home.tsx index d031dcbdd20..91c7fbbfedf 100644 --- a/protocol-dashboard/src/containers/Home/Home.tsx +++ b/protocol-dashboard/src/containers/Home/Home.tsx @@ -24,8 +24,8 @@ import { useProposals } from 'store/cache/proposals/hooks' import { TICKER } from 'utils/consts' import { usePushRoute } from 'utils/effects' import { - AUDIUS_API_URL, AUDIUS_DAPP_URL, + DOCS_URL, GOVERNANCE, OAF_URL, WHITEPAPER_URL @@ -72,7 +72,7 @@ const messages = { developerFriendlyTitle: 'Developer Friendly', developerFriendlyDescription: 'Unlock the potential of music innovation with Audius. Our robust API gives access to hundreds of thousands of songs, offering unparalleled opportunities for creativity.', - developerFriendlyCTA: 'API Documentation' + developerFriendlyCTA: 'Developer Documentation' } const Home = () => { @@ -262,7 +262,7 @@ const Home = () => { diff --git a/protocol-dashboard/src/containers/Node/Node.tsx b/protocol-dashboard/src/containers/Node/Node.tsx index d3cea0ee1fb..c263329ebc1 100644 --- a/protocol-dashboard/src/containers/Node/Node.tsx +++ b/protocol-dashboard/src/containers/Node/Node.tsx @@ -4,6 +4,7 @@ import { useAccount } from 'store/account/hooks' import { useContentNode } from 'store/cache/contentNode/hooks' import { useDiscoveryProvider } from 'store/cache/discoveryProvider/hooks' +import { IconEmbed } from '@audius/harmony' import clsx from 'clsx' import IndividualNodeUptimeChart from 'components/IndividualNodeUptimeChart' import IndividualServiceApiCallsChart from 'components/IndividualServiceApiCallsChart' @@ -12,10 +13,9 @@ import Page from 'components/Page' import { Address, ServiceType, Status } from 'types' import { usePushRoute } from 'utils/effects' import { createStyles } from 'utils/mobile' -import { NOT_FOUND, SERVICES_DISCOVERY_PROVIDER_NODE } from 'utils/routes' +import { NODES_DISCOVERY_NODE, NOT_FOUND } from 'utils/routes' import desktopStyles from './Node.module.css' import mobileStyles from './NodeMobile.module.css' -import { IconEmbed } from '@audius/harmony' const styles = createStyles({ desktopStyles, mobileStyles }) @@ -119,7 +119,7 @@ const Node = () => { const { spID: spIDParam } = useParams<{ spID: string }>() const spID = parseInt(spIDParam, 10) const { wallet: accountWallet } = useAccount() - const isDiscovery = !!useMatch(SERVICES_DISCOVERY_PROVIDER_NODE) + const isDiscovery = !!useMatch(NODES_DISCOVERY_NODE) return ( { const query = new URLSearchParams(location.search) const endpoint = query.get('endpoint') const { wallet: accountWallet } = useAccount() - const isDiscovery = !!useMatch(SERVICES_UNREGISTERED_DISCOVERY_NODE) + const isDiscovery = !!useMatch(NODES_UNREGISTERED_DISCOVERY_NODE) return ( diff --git a/protocol-dashboard/src/containers/User/User.tsx b/protocol-dashboard/src/containers/User/User.tsx index 789ce0fdf8e..1f5c3879092 100644 --- a/protocol-dashboard/src/containers/User/User.tsx +++ b/protocol-dashboard/src/containers/User/User.tsx @@ -12,7 +12,7 @@ import { useAccount } from 'store/account/hooks' import { useUser } from 'store/cache/user/hooks' import { Operator, Status, User } from 'types' import { useReplaceRoute } from 'utils/effects' -import { SERVICES_ACCOUNT_USER, accountPage, operatorPage } from 'utils/routes' +import { NODES_ACCOUNT_USER, accountPage, operatorPage } from 'utils/routes' import { ConnectAudiusProfileCard } from 'components/ConnectAudiusProfileCard/ConnectAudiusProfileCard' import { ManageAccountCard } from 'components/ManageAccountCard/ManageAccountCard' @@ -67,7 +67,7 @@ const UserPage = () => { // Check if on user or operator page useEffect(() => { if (status !== Status.Success) return - const isUserPath = !!matchPath(pathname, SERVICES_ACCOUNT_USER) + const isUserPath = !!matchPath(pathname, NODES_ACCOUNT_USER) if (isServiceProvider && isUserPath) replaceRoute(operatorPage(wallet)) else if (!isServiceProvider && !isUserPath) replaceRoute(accountPage(wallet)) diff --git a/protocol-dashboard/src/utils/routes.ts b/protocol-dashboard/src/utils/routes.ts index 57d61c38519..d7c0ad6c38d 100644 --- a/protocol-dashboard/src/utils/routes.ts +++ b/protocol-dashboard/src/utils/routes.ts @@ -17,39 +17,54 @@ export const ANALYTICS = '/analytics' export const ANALYTICS_TITLE = 'Analytics' // Services Pages -export const SERVICES = '/services' +export const NODES = '/nodes' +export const SERVICES = '/services' // deprecated export const SERVICES_TITLE = 'Services Overview' -export const SERVICES_DISCOVERY_PROVIDER = '/services/discovery-node' +export const NODES_DISCOVERY = '/nodes/discovery-node' +export const SERVICES_DISCOVERY_PROVIDER = '/services/discovery-node' //deprecated export const SERVICES_DISCOVERY_PROVIDER_TITLE = 'Discovery Nodes' -export const SERVICES_DISCOVERY_PROVIDER_NODE = '/services/discovery-node/:spID' +export const NODES_DISCOVERY_NODE = '/nodes/discovery-node/:spID' +export const SERVICES_DISCOVERY_PROVIDER_NODE = '/services/discovery-node/:spID' // deprecated export const SERVICES_DISCOVERY_PROVIDER_NODE_TITLE = 'Discovery Node' +export const NODES_UNREGISTERED_DISCOVERY_NODE = + '/nodes/discovery-node/unregistered' export const SERVICES_UNREGISTERED_DISCOVERY_NODE = - '/services/discovery-node/unregistered' + '/services/discovery-node/unregistered' // deprecated export const SERVICES_UNREGISTERED_DISCOVERY_NODE_TITLE = 'Unregistered Node' -export const SERVICES_CONTENT = '/services/content-node' +export const NODES_CONTENT = '/nodes/content-node' +export const SERVICES_CONTENT = '/services/content-node' // deprecated export const SERVICES_CONTENT_TITLE = 'Content Nodes' -export const SERVICES_CONTENT_NODE = '/services/content-node/:spID' +export const NODES_CONTENT_NODE = '/nodes/content-node/:spID' +export const SERVICES_CONTENT_NODE = '/services/content-node/:spID' // deprecated export const SERVICES_CONTENT_NODE_TITLE = 'Content Node' +export const NODES_UNREGISTERED_CONTENT_NODE = + '/nodes/content-node/unregistered' export const SERVICES_UNREGISTERED_CONTENT_NODE = - '/services/content-node/unregistered' + '/services/content-node/unregistered' // deprecated export const SERVICES_UNREGISTERED_CONTENT_NODE_TITLE = 'Unregistered Node' -export const SERVICES_SERVICE_PROVIDERS = '/services/service-providers' +export const NODES_SERVICE_PROVIDERS = '/nodes/service-providers' +export const SERVICES_SERVICE_PROVIDERS = '/services/service-providers' // deprecated export const SERVICES_SERVICE_PROVIDERS_TITLE = 'All Service Operators' -export const SERVICES_USERS = '/services/users' +export const NODES_USERS = '/nodes/users' +export const SERVICES_USERS = '/services/users' // deprecated export const SERVICES_USERS_TITLE = 'All Users' -export const SERVICES_ACCOUNT = '/services/user' -export const SERVICES_ACCOUNT_USER = '/services/user/:wallet' +export const NODES_ACCOUNT = '/nodes/user' +export const SERVICES_ACCOUNT = '/services/user' // deprecated +export const NODES_ACCOUNT_USER = '/nodes/user/:wallet' +export const SERVICES_ACCOUNT_USER = '/services/user/:wallet' // deprecated export const SERVICES_ACCOUNT_USER_TITLE = 'User' -export const SERVICES_OPERATOR = '/services/operator' -export const SERVICES_ACCOUNT_OPERATOR = '/services/operator/:wallet' +export const SERVICES_OPERATOR = '/services/operator' // deprecated +export const NODES_OPERATOR = '/nodes/operator' +export const SERVICES_ACCOUNT_OPERATOR = '/services/operator/:wallet' // deprecated +export const NODES_ACCOUNT_OPERATOR = '/nodes/operator/:wallet' export const SERVICES_ACCOUNT_OPERATOR_TITLE = 'Operator' // Governance Pages @@ -66,44 +81,60 @@ export const OAF_URL = 'https://audius.org' export const WHITEPAPER_URL = 'https://whitepaper.audius.co' export const AUDIUS_DAPP_URL = import.meta.env.VITE_AUDIUS_URL || 'https://audius.co' +export const DOCS_URL = 'https://docs.audius.org/' export const REGISTER_NODE_DOCS_URL = 'https://docs.audius.org/node-operator/setup/overview' // Get Routes export const accountPage = (address: string) => { - return `${SERVICES_ACCOUNT}/${address}` + return `${NODES_ACCOUNT}/${address}` } export const operatorPage = (address: string) => { - return `${SERVICES_OPERATOR}/${address}` + return `${NODES_OPERATOR}/${address}` } export const discoveryNodePage = (spID: number) => { - return `${SERVICES_DISCOVERY_PROVIDER}/${spID}` + return `${NODES_DISCOVERY}/${spID}` } export const contentNodePage = (spID: number) => { - return `${SERVICES_CONTENT}/${spID}` + return `${NODES_CONTENT}/${spID}` } export const proposalPage = (proposalId: number) => { return `${GOVERNANCE}/proposal/${proposalId}` } +export const SIMPLE_DEPRECATED_SERVICE_ROUTES_TO_NODES_ROUTES = { + [SERVICES]: NODES, + [SERVICES_UNREGISTERED_DISCOVERY_NODE]: NODES_UNREGISTERED_DISCOVERY_NODE, + [SERVICES_DISCOVERY_PROVIDER]: NODES_DISCOVERY, + [SERVICES_UNREGISTERED_CONTENT_NODE]: NODES_UNREGISTERED_CONTENT_NODE, + [SERVICES_CONTENT]: NODES_CONTENT, + [SERVICES_SERVICE_PROVIDERS]: NODES_SERVICE_PROVIDERS, + [SERVICES_USERS]: NODES_USERS + // Exclude these bc they have path params: + // [SERVICES_CONTENT_NODE]: NODES_CONTENT_NODE, + // [SERVICES_DISCOVERY_PROVIDER_NODE]: NODES_DISCOVERY_NODE, + // [SERVICES_ACCOUNT_USER]: NODES_ACCOUNT_USER, + // [SERVICES_ACCOUNT_OPERATOR]: NODES_ACCOUNT_OPERATOR +} + const routeTitles = { [HOME]: HOME_TITLE, [ANALYTICS]: ANALYTICS_TITLE, - [SERVICES_DISCOVERY_PROVIDER]: SERVICES_DISCOVERY_PROVIDER_TITLE, - [SERVICES]: SERVICES_TITLE, + [NODES_DISCOVERY]: SERVICES_DISCOVERY_PROVIDER_TITLE, + [NODES]: SERVICES_TITLE, [GOVERNANCE]: GOVERNANCE_TITLE, [GOVERNANCE_PROPOSAL]: GOVERNANCE_TITLE, - [SERVICES_USERS]: SERVICES_USERS_TITLE, - [SERVICES_ACCOUNT_USER]: SERVICES_ACCOUNT_USER_TITLE, - [SERVICES_ACCOUNT_OPERATOR]: SERVICES_ACCOUNT_OPERATOR_TITLE, - [SERVICES_SERVICE_PROVIDERS]: SERVICES_SERVICE_PROVIDERS_TITLE, - [SERVICES_CONTENT_NODE]: SERVICES_CONTENT_NODE_TITLE, - [SERVICES_CONTENT]: SERVICES_CONTENT_TITLE, - [SERVICES_DISCOVERY_PROVIDER_NODE]: SERVICES_DISCOVERY_PROVIDER_NODE_TITLE, + [NODES_USERS]: SERVICES_USERS_TITLE, + [NODES_ACCOUNT_USER]: SERVICES_ACCOUNT_USER_TITLE, + [NODES_ACCOUNT_OPERATOR]: SERVICES_ACCOUNT_OPERATOR_TITLE, + [NODES_SERVICE_PROVIDERS]: SERVICES_SERVICE_PROVIDERS_TITLE, + [NODES_CONTENT_NODE]: SERVICES_CONTENT_NODE_TITLE, + [NODES_CONTENT]: SERVICES_CONTENT_TITLE, + [NODES_DISCOVERY_NODE]: SERVICES_DISCOVERY_PROVIDER_NODE_TITLE, [API]: API_TITLE, [API_LEADERBOARD]: API_LEADERBOARD_TITLE } @@ -118,7 +149,7 @@ export const usePageTitle = () => { } export const isCryptoPage = (route: string) => { - return route.startsWith(GOVERNANCE) || route.startsWith(SERVICES) + return route.startsWith(GOVERNANCE) || route.startsWith(NODES) } export const navRoutes = [ @@ -133,8 +164,8 @@ export const navRoutes = [ text: 'ANALYTICS' }, { - baseRoute: SERVICES, - matchParams: [{ path: `${SERVICES}*` }], + baseRoute: NODES, + matchParams: [{ path: `${NODES}*` }, { path: `${SERVICES}*` }], text: 'NODES' }, {