// Dependencies import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import { nsMerge } from 'shared/utils.mjs' import { freeSewingConfig as config } from 'shared/config/freesewing.config.mjs' // Hooks import { useTranslation } from 'next-i18next' import { useState } from 'react' // Components import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs' import { Joost } from 'shared/components/joost.mjs' import { BareLayout } from 'site/components/layouts/bare.mjs' import { Breadcrumbs } from 'shared/components/navigation/sitenav.mjs' import { DiscordIcon, FacebookIcon, GitHubIcon, InstagramIcon, RedditIcon, TwitterIcon, YouTubeIcon, CommunityIcon, ChatIcon, EmailIcon, } from 'shared/components/icons.mjs' import { PleaseSubscribe, ns as subNs } from 'shared/components/patrons/please-subscribe.mjs' import { SupportForm, ns as supportNs } from 'shared/components/support.mjs' // Translation namespaces used on this page const ns = nsMerge(pageNs, supportNs, subNs) const SupportCard = ({ bg, textColor, title, icon, nr }) => (

{nr} {title} {icon}

) const socialIcon = { discord: , facebook: , github: , instagram: , reddit: , twitter: , youtube: , } /* * Each page MUST be wrapped in the PageWrapper component. * You also MUST spread props.page into this wrapper component * when path and locale come from static props (as here) * or set them manually. */ const SupportPage = ({ page }) => { const { t } = useTranslation(ns) const [request, setRequest] = useState(false) const pageTitle = request ? t('createSupportRequest') : t('sections:support') if (request) return (

{pageTitle}

) return (

{pageTitle}

{t('howCanWeSupportYou')}

{/* Community */}
} />

{t('support:communitySupport1')}

{t('support:communitySupport2')}

{Object.keys(config.social) .sort() .map((key) => ( {socialIcon[key.toLowerCase()]} {key} ))}
{/* Contributors */}
} />

{t('support:contributorSupport2')}

{/* Maintainer */}
} />

{t('support:maintainerSupport2')}

{t('emailAddress', { address: 'joost@joost.at' })}

{t('howCanYouSupportFreeSewing')}

) } export default SupportPage export async function getStaticProps({ locale }) { return { props: { ...(await serverSideTranslations(locale, ns)), page: { locale, path: ['patrons', 'thanks'], }, }, } }