eslint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from "react"
|
||||
import React from 'react'
|
||||
import dbConnect from '../../lib/dbConnect'
|
||||
import { models } from 'shared-stuff'
|
||||
import Hero from './Hero'
|
||||
import Table from './Table'
|
||||
|
||||
export default class Home extends React.Component {
|
||||
@@ -11,16 +12,17 @@ export default class Home extends React.Component {
|
||||
|
||||
render () {
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Hero />
|
||||
<Table
|
||||
scanResults={this.scanResults}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
export async function getServerSideProps () {
|
||||
try {
|
||||
await dbConnect()
|
||||
const scanResults = await models.ScanResult.find({})
|
||||
@@ -28,12 +30,12 @@ export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
scanResults: JSON.parse(JSON.stringify(scanResults))
|
||||
},
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
return {
|
||||
props: {},
|
||||
props: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user