Files
link-free/src/pages/dash.tsx
T

21 lines
491 B
TypeScript
Raw Normal View History

2021-12-13 17:12:51 -03:00
import { GetServerSideProps } from 'next'
2021-12-13 00:36:38 -03:00
import { Dash } from '../components/Dash'
2021-12-13 17:12:51 -03:00
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()
2021-12-13 00:36:38 -03:00
2021-12-13 17:12:51 -03:00
return {
props: { initialData }
}
2021-12-13 00:36:38 -03:00
}