Files
KVideo/lib/utils/profile-storage.ts
T

11 lines
353 B
TypeScript

import { getProfileId } from '@/lib/store/auth-store';
/**
* Returns a profiled localStorage key based on the current user's profileId.
* If no session exists, returns the base key unchanged (backward compatible).
*/
export function profiledKey(baseKey: string): string {
const id = getProfileId();
return id ? `${baseKey}-p-${id}` : baseKey;
}