diff --git a/src/app/_components/Footer/StacksSmiley.tsx b/src/app/_components/Footer/StacksSmiley.tsx new file mode 100644 index 000000000..4bd65166e --- /dev/null +++ b/src/app/_components/Footer/StacksSmiley.tsx @@ -0,0 +1,34 @@ +import { useColorMode } from '@/components/ui/color-mode'; +import { StacksSmileyDarkIcon } from '@/ui/icons/StacksSmileyDarkIcon'; +import { StacksSmileyLaserEyesDarkIcon } from '@/ui/icons/StacksSmileyLaserEyesDarkIcon'; +import { StacksSmileyLaserEyesLightIcon } from '@/ui/icons/StacksSmileyLaserEyesLightIcon'; +import { StacksSmileyLightIcon } from '@/ui/icons/StacksSmileyLightIcon'; +import { Box, BoxProps, ClientOnly } from '@chakra-ui/react'; +import { useState } from 'react'; + +export const StacksSmiley = (boxProps: BoxProps) => { + const { colorMode } = useColorMode(); + const [isHovered, setIsHovered] = useState(false); + return ( + + setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + {...boxProps} + > + {colorMode === 'light' ? ( + isHovered ? ( + + ) : ( + + ) + ) : isHovered ? ( + + ) : ( + + )} + + + ); +}; diff --git a/src/app/_components/NewFooter.tsx b/src/app/_components/NewFooter.tsx new file mode 100644 index 000000000..601f69849 --- /dev/null +++ b/src/app/_components/NewFooter.tsx @@ -0,0 +1,211 @@ +'use client'; + +import { ExplorerLink } from '@/common/components/ExplorerLinks'; +import { HiroIcon } from '@/ui/icons/HiroIcon'; +import { StacksNameAndLogo } from '@/ui/icons/StacksNameAndLogo'; +import { Box, Flex, Grid, Stack, Text } from '@chakra-ui/react'; + +import { PAGE_MAX_WIDTH } from '../../common/constants/constants'; +import { Link } from '../../ui/Link'; +import { StacksSmiley } from './Footer/StacksSmiley'; + +interface Link { + label: string; + href: string; +} + +const rightSideLinks: Link[] = [ + { + label: 'Home', + href: '/', + }, + { + label: 'Blocks', + href: '/blocks', + }, + { + label: 'Transactions', + href: '/transactions', + }, + { + label: 'sBTC', + href: '/token/SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token', + }, + { + // This page is not implemented yet + label: 'Stacking', + href: '/stacking', + }, + { + // This page is not implemented yet + label: 'Mempool', + href: '/mempool', + }, + { + label: 'Signers', + href: '/signers', + }, + { + label: 'Tokens', + href: '/tokens', + }, + { + // This page is not implemented yet + label: 'NFTs', + href: '/nfts', + }, + { + // This page is not implemented yet + label: 'Analytics', + href: '/analytics', + }, + { + label: 'Search', + href: '/search', + }, +]; + +const leftSideLinks: Link[] = [ + { + label: 'Sandbox', + href: '/sandbox/deploy', + }, + { + label: 'Status Center', + href: 'https://status.hiro.so/', + }, + { + label: 'Support', + href: '/support', + }, +]; + +const xPadding = 8; + +export const NewFooter = () => { + return ( + + + + + + + + + {rightSideLinks.map(link => ( + + {link.label} + + ))} + + + + {leftSideLinks.map(link => ( + + {link.label} + + ))} + + + + + + {rightSideLinks.concat(leftSideLinks).map(link => ( + + {link.label} + + ))} + + + + + + + + This Stacks Explorer is built and maintained by{' '} + + Hiro + + + + + Terms of Use + + + Privacy Policy + + + Market data provided by{' '} + + LunarCrush + + + + + + + + + + ); +}; diff --git a/src/app/_components/PageWrapper.tsx b/src/app/_components/PageWrapper.tsx index af27895f1..d12e7db48 100644 --- a/src/app/_components/PageWrapper.tsx +++ b/src/app/_components/PageWrapper.tsx @@ -1,5 +1,6 @@ 'use client'; +import { isRedesignUrl } from '@/common/utils/url-utils'; import { Stack } from '@chakra-ui/react'; import styled from '@emotion/styled'; import { ReactNode } from 'react'; @@ -11,6 +12,7 @@ import { TokenPrice } from '../../common/types/tokenPrice'; import { Footer } from './Footer'; import { NavBar } from './NavBar'; import { NetworkModeToast } from './NetworkModeToast'; +import { NewFooter } from './NewFooter'; import { CMSStatusBars } from './StatusBar/CMSStatusBars'; import { IncidentsStatusBarWithErrorBoundary } from './StatusBar/IncidentsStatusBar'; import { NonHiroNetworkWarningBar } from './StatusBar/NonHiroNetworkWarningBar'; @@ -82,6 +84,7 @@ export function PageWrapper({ statusBarContent: IncidentContent | null; serverThemeCookie: string; }) { + const redesignUrl = isRedesignUrl(); return ( <> @@ -99,7 +102,7 @@ export function PageWrapper({ > {children} -