onedrive/pages/index.tsx

41 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-06-22 11:58:37 +00:00
import Head from 'next/head'
2022-02-05 22:18:26 +00:00
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import siteConfig from '../config/site.config'
import Navbar from '../components/Navbar'
import FileListing from '../components/FileListing'
import Footer from '../components/Footer'
2021-06-23 20:27:51 +00:00
import Breadcrumb from '../components/Breadcrumb'
2022-02-08 15:30:12 +00:00
import SwitchLayout from '../components/SwitchLayout'
2021-06-22 11:58:37 +00:00
export default function Home() {
return (
<div className="flex min-h-screen flex-col items-center justify-center bg-white dark:bg-gray-900">
2021-06-22 11:58:37 +00:00
<Head>
<title>{siteConfig.title}</title>
2021-06-22 11:58:37 +00:00
</Head>
<main className="flex w-full flex-1 flex-col bg-gray-50 dark:bg-gray-800">
<Navbar />
<div className="mx-auto w-full max-w-5xl p-4">
<nav className="mb-4 flex items-center justify-between pl-1">
<Breadcrumb />
<SwitchLayout />
</nav>
2021-06-23 20:27:51 +00:00
<FileListing />
</div>
2021-06-22 11:58:37 +00:00
</main>
<Footer />
2021-06-22 11:58:37 +00:00
</div>
)
}
2022-02-05 22:18:26 +00:00
2022-02-05 22:54:52 +00:00
export async function getServerSideProps({ locale }) {
2022-02-05 22:18:26 +00:00
return {
props: {
2022-02-08 15:30:12 +00:00
...(await serverSideTranslations(locale, ['common'])),
},
2022-02-05 22:18:26 +00:00
}
}