import styles from '@/styles/Home.module.css'
import Layout from '@/components/Layout'
import { NextPage } from 'next'
import HomePageComponets from '@/components/HomePage'
import type { GetStaticProps } from 'next'
// import { useTranslation } from 'next-i18next'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import KoreaCheck from '@/components/KoreaCheck'
import { IS_LOCAL } from '@/common/constans/international'

const Home: NextPage = () => {
    // const { t } = useTranslation('translation')
    return (
        <Layout>
            <div className={styles.home}>
                <HomePageComponets></HomePageComponets>
                {!IS_LOCAL ? <KoreaCheck></KoreaCheck> : null}
            </div>
        </Layout>
    )
}

export const getStaticProps: GetStaticProps = async ({ locale }) => ({
    props: {
        ...(await serverSideTranslations(locale ?? 'zh-CN', ['index', 'common'])),
    },
})

export default Home
