import dynamic from 'next/dynamic'; import { Button, Flex, Link, Icon, HStack, useToken } from '@chakra-ui/react'; import { If } from '~/components'; import { useConfig, useMobile, useColorValue, useBreakpointValue } from '~/context'; import { useStrf } from '~/hooks'; import { FooterButton } from './button'; import { ColorModeToggle } from './colorMode'; const CodeIcon = dynamic(() => import('@meronex/icons/fi').then(i => i.FiCode)); const ExtIcon = dynamic(() => import('@meronex/icons/go').then(i => i.GoLinkExternal)); export const Footer: React.FC = () => { const { web, content, primary_asn } = useConfig(); const footerBg = useColorValue('blackAlpha.50', 'whiteAlpha.100'); const footerColor = useColorValue('black', 'white'); const extUrl = useStrf(web.external_link.url, { primary_asn }) ?? '/'; const size = useBreakpointValue({ base: useToken('sizes', 4), lg: useToken('sizes', 6) }); const btnSize = useBreakpointValue({ base: 'xs', lg: 'sm' }); const isMobile = useMobile(); return ( {!isMobile && } } /> ); };