mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
18 lines
444 B
TypeScript
18 lines
444 B
TypeScript
import type { GetServerSideProps, GetServerSidePropsResult } from 'next';
|
|
|
|
export type Props = {
|
|
cookies: string;
|
|
referrer: string;
|
|
hash?: string;
|
|
}
|
|
|
|
export const getServerSideProps: GetServerSideProps = async({ req, query }): Promise<GetServerSidePropsResult<Props>> => {
|
|
return {
|
|
props: {
|
|
cookies: req.headers.cookie || '',
|
|
referrer: req.headers.referer || '',
|
|
hash: query.hash?.toString() || '',
|
|
},
|
|
};
|
|
};
|