mirror of
https://github.com/dsoaress/link-free.git
synced 2026-11-27 21:24:44 +00:00
feat: test ISR
This commit is contained in:
26 files changed
+295
-192
No files matched your search
+19
-3
@@ -1,5 +1,21 @@
|
||||
import { Dash } from '../components/Dash'
|
||||
import { GetServerSideProps } from 'next'
|
||||
|
||||
export default function DashPage() {
|
||||
return <Dash />
|
||||
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 }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user