import { Link } from 'rspress/theme'; import { useLang } from 'rspress/runtime'; import { useI18n } from '../../i18n/index'; function useFooterData() { const t = useI18n(); const lang = useLang(); const getLink = (link: string) => (lang === 'en' ? link : `/${lang}${link}`); return [ { title: t('guide'), items: [ { title: t('quickStart'), link: getLink('/guide/start/quick-start'), }, ], }, { title: 'Configuration', items: [ { title: t('Configuration'), link: getLink('/configure/index'), }, ], }, { title: t('friendLink'), items: [ { title: 'Web Infra', link: 'https://webinfra.org', }, { title: 'Rspack', link: 'https://www.rspack.dev/', }, { title: 'Modern.js Framework', link: 'https://modernjs.dev/en/', }, { title: 'Rspress', link: 'https://rspress.dev/', }, { title: 'Zephyr Cloud', link: 'https://zephyr-cloud.io/', }, ], }, { title: t('community'), items: [ { title: 'GitHub', link: 'https://github.com/module-federation/core', }, // { // title: 'Discord', // link: 'https://discord.gg/ab2Rv4BXwf', // }, ], }, ]; } export function HomeFooter() { const footerData = useFooterData(); return (
{footerData.map((item, newKey) => (

{item.title}

    {item.items.map((subItem, key) => (
  • {subItem.title}
  • ))}
))}

© {new Date().getFullYear()} Module Federation core team. All Rights Reserved.

); }