2021-07-23 16:14:54 +00:00
|
|
|
import Head from 'next/head'
|
2021-07-23 18:35:41 +00:00
|
|
|
import Link from 'next/link'
|
2021-07-23 16:14:54 +00:00
|
|
|
import styles from '../styles/Home.module.css'
|
2021-07-23 18:35:41 +00:00
|
|
|
import { useRouter } from 'next/router'
|
|
|
|
import { useTranslations } from 'next-intl'
|
|
|
|
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
|
2021-07-23 20:31:56 +00:00
|
|
|
import Image from 'next/image'
|
2021-07-23 18:35:41 +00:00
|
|
|
|
|
|
|
export function getStaticProps({locale}: GetStaticPropsContext) {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
// You can get the messages from anywhere you like, but the recommended
|
|
|
|
// pattern is to put them in JSON files separated by language and read
|
|
|
|
// the desired one based on the `locale` received from Next.js.
|
|
|
|
messages: require(`../locales/${locale}.json`),
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2021-07-23 16:14:54 +00:00
|
|
|
|
|
|
|
export default function Home() {
|
2021-07-23 18:35:41 +00:00
|
|
|
const router = useRouter()
|
|
|
|
const t = useTranslations('common')
|
2021-07-23 16:14:54 +00:00
|
|
|
return (
|
|
|
|
<div className={styles.container}>
|
|
|
|
<Head>
|
2021-07-23 18:35:41 +00:00
|
|
|
<title>Vänner Bäst | Friends Best</title>
|
2021-07-23 16:14:54 +00:00
|
|
|
<meta name="description" content="Generated by create next app" />
|
|
|
|
<link rel="icon" href="/favicon.ico" />
|
|
|
|
</Head>
|
|
|
|
|
|
|
|
<main className={styles.main}>
|
2021-07-23 20:31:56 +00:00
|
|
|
<Image src="/yr.jpg" alt="Young Royals" width={256} height={144} />
|
2021-07-23 16:14:54 +00:00
|
|
|
<h1 className={styles.title}>
|
2021-07-23 18:35:41 +00:00
|
|
|
{t('welcome')}
|
2021-07-23 16:14:54 +00:00
|
|
|
</h1>
|
2021-07-23 18:35:41 +00:00
|
|
|
<p className={styles.description}>
|
|
|
|
{t('desc')}
|
|
|
|
</p>
|
|
|
|
<div className={styles.grid}>
|
|
|
|
<a href="/watch" className={styles.card}>
|
|
|
|
<h2>{t('watch.title')} →</h2>
|
|
|
|
<p>{t('watch.desc')} </p>
|
|
|
|
</a>
|
|
|
|
<a href="/discord" className={styles.card}>
|
|
|
|
<h2>Discord →</h2>
|
|
|
|
<p>{t('discord')}</p>
|
|
|
|
</a>
|
|
|
|
<a href="/reddit" className={styles.card}>
|
|
|
|
<h2>Reddit →</h2>
|
|
|
|
<p>{t('reddit')}</p>
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-07-23 16:14:54 +00:00
|
|
|
</main>
|
2021-07-23 18:35:41 +00:00
|
|
|
<footer className={styles.footer}><Link href="https://ludoviko.ch">Created by: Ludoviko</Link></footer>
|
2021-07-23 16:14:54 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|