Commit 7700cd77 authored by tom's avatar tom

merge fix

parent 4f9d218e
......@@ -26,10 +26,10 @@ export default function useNavItems() {
const accountNavItems = [
{ text: 'Watchlist', pathname: basePath + '/account/watchlist', icon: watchlistIcon },
{ text: 'Private tags', pathname: basePath + '/account/private-tags', icon: privateTagIcon },
{ text: 'Public tags', pathname: basePath + '/account/public-tags', icon: publicTagIcon },
{ text: 'API keys', pathname: basePath + '/account/api-keys', icon: apiKeysIcon },
{ text: 'Custom ABI', pathname: basePath + '/account/custom-abi', icon: abiIcon },
{ text: 'Private tags', pathname: basePath + '/account/private_tags', icon: privateTagIcon },
{ text: 'Public tags', pathname: basePath + '/account/public_tags_request', icon: publicTagIcon },
{ text: 'API keys', pathname: basePath + '/account/api_key', icon: apiKeysIcon },
{ text: 'Custom ABI', pathname: basePath + '/account/custom_abi', icon: abiIcon },
];
return { mainNavItems, accountNavItems };
......
import { Popover, PopoverTrigger, Box } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import React from 'react';
import * as cookies from 'lib/cookies';
import NetworkMenuButton from './NetworkMenuButton';
import NetworkMenuPopup from './NetworkMenuPopup';
interface Props {
......@@ -11,19 +8,6 @@ interface Props {
}
const NetworkMenu = ({ isCollapsed }: Props) => {
const router = useRouter();
const networkType = router.query.network_type;
const networkSubType = router.query.network_sub_type;
React.useEffect(() => {
if (typeof networkType === 'string') {
cookies.set(cookies.NAMES.NETWORK_TYPE, networkType);
}
if (typeof networkSubType === 'string') {
cookies.set(cookies.NAMES.NETWORK_SUB_TYPE, networkSubType);
}
}, [ networkType, networkSubType ]);
return (
<Popover openDelay={ 300 } placement="right-start" gutter={ 22 } isLazy>
<PopoverTrigger>
......
import { Box, HStack, VStack } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import React from 'react';
import * as cookies from 'lib/cookies';
import useIsMobile from 'lib/hooks/useIsMobile';
import Header from 'ui/header/Header';
import Navigation from 'ui/navigation/Navigation';
......@@ -11,6 +13,18 @@ interface Props {
const Page = ({ children }: Props) => {
const isMobile = useIsMobile();
const router = useRouter();
const networkType = router.query.network_type;
const networkSubType = router.query.network_sub_type;
React.useEffect(() => {
if (typeof networkType === 'string') {
cookies.set(cookies.NAMES.NETWORK_TYPE, networkType);
}
if (typeof networkSubType === 'string') {
cookies.set(cookies.NAMES.NETWORK_SUB_TYPE, networkSubType);
}
}, [ networkType, networkSubType ]);
return (
<HStack
......
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