Files
link-free/src/pages/dash.tsx
T
2021-12-14 10:28:33 -03:00

22 lines
491 B
TypeScript

import { GetServerSideProps } from 'next'
import { Dash } from '../components/Dash'
import { fetchData } from '../services/fetchData'
import type { Data } from '../types/Data'
type DashPageProps = {
initialData: Data
}
export default function DashPage({ initialData }: DashPageProps) {
return <Dash initialData={initialData} />
}
export const getServerSideProps: GetServerSideProps = async () => {
const initialData = await fetchData()
return {
props: { initialData }
}
}