forked from mrwyndham/fastpocket
14 lines
406 B
TypeScript
14 lines
406 B
TypeScript
import { cookies } from "next/headers";
|
|
|
|
export async function setCookie(key: string, value: string) {
|
|
const cookieStore = cookies()
|
|
cookieStore.set(key, value)
|
|
}
|
|
export async function removeCookie(key: string) {
|
|
const cookieStore = cookies()
|
|
cookieStore.delete(key)
|
|
}
|
|
export async function getCookie(key: string) {
|
|
const cookieStore = cookies()
|
|
return cookieStore.get(key)
|
|
} |