2021-12-18 22:41:05 -03:00
|
|
|
import type { GetStaticProps } from 'next'
|
2021-12-13 17:12:51 -03:00
|
|
|
|
2021-12-12 23:45:41 -03:00
|
|
|
import { Home } from '../components/Home'
|
2021-12-13 17:12:51 -03:00
|
|
|
import { fetchData } from '../services/fetchData'
|
|
|
|
|
|
2021-12-18 00:50:54 -03:00
|
|
|
export default function HomePage() {
|
2021-12-12 23:45:41 -03:00
|
|
|
return <Home />
|
2021-12-10 20:54:28 -03:00
|
|
|
}
|
2021-12-13 17:12:51 -03:00
|
|
|
|
|
|
|
|
export const getStaticProps: GetStaticProps = async () => {
|
2021-12-18 00:50:54 -03:00
|
|
|
const initialData = await fetchData()
|
2021-12-13 17:12:51 -03:00
|
|
|
|
|
|
|
|
return {
|
2021-12-18 00:50:54 -03:00
|
|
|
props: { initialData },
|
2021-12-13 17:12:51 -03:00
|
|
|
revalidate: 1
|
|
|
|
|
}
|
|
|
|
|
}
|