Migrate to yarn berry and fix all workspace errors

This commit is contained in:
2022-07-07 01:12:21 +03:00
parent 78fd1b5adf
commit 862cbd3af1
41 changed files with 5878 additions and 8452 deletions

View File

@@ -0,0 +1,30 @@
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { models } from 'shared-stuff'
import dbConnect from '../../lib/dbConnect'
import Hero from './Hero'
import Table from './Table'
export default function Home ({ scanResults }) {
return (
<>
<Hero />
<Table
scanResults={scanResults}
/>
</>
)
}
export async function getServerSideProps ({ locale }) {
await dbConnect()
const scanResults = await models.ScanResult.find({})
return {
props: {
scanResults: JSON.parse(JSON.stringify(scanResults)),
...(await serverSideTranslations(locale, ['common', 'home']))
}
}
}