"use client"; import { getCookie } from "cookies-next"; import { Credential } from "../types/auth"; export default function getClientCredential(): Credential | null { const credentialStr = getCookie("credential"); return credentialStr ? JSON.parse(credentialStr) : null; }