import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import { useTranslation } from 'next-i18next' import { useRouter } from 'next/router' import Link from 'next/link' import { PageWrapper } from 'site/components/wrappers/page.mjs' import { useApp } from 'site/hooks/useApp.mjs' import { HomeLayout } from 'site/components/layouts/home.mjs' import { FreeSewingIcon } from 'shared/components/icons.mjs' import { Popout } from 'shared/components/popout.mjs' import themes from 'shared/themes/index.js' const translations = { sade: { en: `Stand-alone development environment`, nl: `Vrijstaande ontwikkeling omgeving`, }, load: { en: `To your design`, nl: `Naar jouw ontwerp`, }, tips: { en: ( Edit the files in the design folder, and we'll auto-update your design ), nl: ( Bewerk de bestanden in de design map, en we passen je ontwerp automatisch aan ), }, } const HomePage = () => { const app = useApp() const router = useRouter() const { t } = useTranslation(['common', 'patrons', 'locales', 'themes']) return ( FreeSewing {translations.sade[app.locale]} <> 👉 {translations.load[app.locale]} 👈 > {translations.tips[app.locale]} {router.locales.map((locale) => ( {t(`locales:${locale}`)} ))} {Object.keys(themes).map((theme) => ( app.setTheme(theme)} className="btn btn-ghost hover:bg-base-200" > {t(`themes:${theme}Theme`)} ))} {t('patrons:supportFreesewing')} {t('patrons:patronLead')} {t('patrons:patronPitch')} 🥰 {t('patrons:becomeAPatron')} 🙏🏻 {/* here to force Tailwind inclusion of the w-8 h-8 classes */} ) } export default HomePage export async function getStaticProps({ locale }) { return { props: { ...(await serverSideTranslations(locale)), }, } }
{t('patrons:patronLead')}
{t('patrons:patronPitch')}