You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
415 B
21 lines
415 B
2 years ago
|
import { gSSP } from "app/blitz-server"
|
||
|
import React from "react"
|
||
|
|
||
|
interface ContextParams {
|
||
|
cookies: Record<string, string | undefined>
|
||
|
}
|
||
|
|
||
|
interface Props {
|
||
|
props: ContextParams
|
||
|
}
|
||
|
|
||
|
export const serverSideProps = async ({ ctx, req }): Promise<Props> => {
|
||
|
return {
|
||
|
props: {
|
||
|
cookies: req.cookies,
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export const ServerSidePropsContext = React.createContext<ContextParams>({ cookies: {} })
|