mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
18 lines
354 B
TypeScript
18 lines
354 B
TypeScript
import {
|
|
cookies as myCookies,
|
|
headers as myHeaders,
|
|
draftMode as myDraftMode,
|
|
} from 'next/headers'
|
|
|
|
export const myFun = async (): Promise<any> => {
|
|
const name = (await myCookies()).get('name')
|
|
}
|
|
|
|
export const myFun2 = async (): Promise<any> => {
|
|
await myHeaders()
|
|
}
|
|
|
|
export const myFun3 = async (): Promise<any> => {
|
|
await myDraftMode()
|
|
}
|