mirror of
https://github.com/dsoaress/link-free.git
synced 2026-11-21 10:58:34 +00:00
22 lines
491 B
TypeScript
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 }
|
|
}
|
|
}
|