import React, { useMemo } from 'react'; import { Box, Flex, useDisclosure } from '@chakra-ui/react'; import { feConfigs } from '@/store/static'; import { useTranslation } from 'react-i18next'; import Avatar from '@/components/Avatar'; import { useRouter } from 'next/router'; import CommunityModal from '@/components/CommunityModal'; const Footer = () => { const { t } = useTranslation(); const router = useRouter(); const { isOpen, onOpen, onClose } = useDisclosure(); const list = useMemo( () => [ { label: t('home.Footer Product'), child: [ { label: t('home.Footer FastGPT Cloud', { title: feConfigs.systemTitle }), onClick: () => { router.push('/app/list'); } }, { label: 'Sealos', onClick: () => { window.open('https://github.com/labring/sealos', '_blank'); } }, { label: 'Laf', onClick: () => { window.open('https://github.com/labring/laf', '_blank'); } } ] }, { label: t('home.Footer Developer'), child: [ { label: t('home.Footer Git'), onClick: () => { window.open('https://github.com/labring/FastGPT', '_blank'); } }, { label: t('home.Footer Docs'), onClick: () => { window.open('https://doc.fastgpt.run/docs/intro', '_blank'); } } ] }, { label: t('home.Footer Support'), child: [ { label: t('home.Footer Feedback'), onClick: () => { window.open('https://github.com/labring/FastGPT/issues', '_blank'); } }, { label: t('home.Community'), onClick: () => { onOpen(); } } ] } ], [onOpen, t] ); return ( {feConfigs?.systemTitle} {t('home.FastGPT Desc', { title: feConfigs.systemTitle })} {list.map((item) => ( {item.label} {item.child.map((child) => ( {child.label} ))} ))} {isOpen && } ); }; export default Footer;