Added links to homepage
This commit is contained in:
parent
ec742b15db
commit
1ee4053c4c
10 changed files with 156 additions and 10 deletions
|
|
@ -1,7 +1,10 @@
|
|||
import '../styles/globals.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
import {NextIntlProvider} from 'next-intl';
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />
|
||||
function _App({ Component, pageProps }: AppProps) {
|
||||
return <NextIntlProvider messages={pageProps.messages}>
|
||||
<Component {...pageProps} />
|
||||
</NextIntlProvider>
|
||||
}
|
||||
export default MyApp
|
||||
export default _App
|
||||
|
|
|
|||
|
|
@ -1,24 +1,55 @@
|
|||
import Head from 'next/head'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import styles from '../styles/Home.module.css'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useTranslations } from 'next-intl'
|
||||
import { GetStaticPropsContext, InferGetStaticPropsType } from 'next'
|
||||
|
||||
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`),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const router = useRouter()
|
||||
const t = useTranslations('common')
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Head>
|
||||
<title>Vanner Bast | Friends Best</title>
|
||||
<title>Vänner Bäst | Friends Best</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className={styles.main}>
|
||||
<h1 className={styles.title}>
|
||||
Welcome to Vanner Bast.
|
||||
{t('welcome')}
|
||||
</h1>
|
||||
<h2>
|
||||
This website is currently WIP.
|
||||
</h2>
|
||||
<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>
|
||||
</main>
|
||||
<footer className={styles.footer}><Link href="https://ludoviko.ch">Created by: Ludoviko</Link></footer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue