.
This commit is contained in:
1 parent
5af2c80cd1
commit
f7ee34da4f
78 files changed
+9016
-150
No files matched your search
@@ -36,12 +36,14 @@ function subscribeToWindowChanges(eventName: string, callback: () => void) {
|
||||
}
|
||||
|
||||
export function getAuthUserId(): string | null {
|
||||
if (!import.meta.env.DEV) return null;
|
||||
if (typeof window === 'undefined') return null;
|
||||
const value = window.localStorage.getItem(AUTH_USER_ID_STORAGE_KEY)?.trim();
|
||||
return value ? value : null;
|
||||
}
|
||||
|
||||
export function setAuthUserId(userId: string | null) {
|
||||
if (!import.meta.env.DEV) return;
|
||||
if (typeof window === 'undefined') return;
|
||||
|
||||
if (!userId?.trim()) {
|
||||
|
||||
Reference in new issue
Block a user