mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-22 16:27:55 -03:00
creada store de usuario
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
import { writable } from 'svelte/store';
|
||||||
|
import type { User } from '../../types';
|
||||||
|
|
||||||
|
export const currentUser = writable<User | null>(null);
|
||||||
|
|
||||||
|
export const userStore = {
|
||||||
|
subscribe: currentUser.subscribe,
|
||||||
|
set: currentUser.set,
|
||||||
|
update: currentUser.update,
|
||||||
|
reset: () => currentUser.set(null)
|
||||||
|
};
|
||||||
Vendored
+13
@@ -12,3 +12,16 @@ export interface Post {
|
|||||||
visibility: string;
|
visibility: string;
|
||||||
hashtags?: string[];
|
hashtags?: string[];
|
||||||
}
|
}
|
||||||
|
export interface User {
|
||||||
|
_id: string;
|
||||||
|
displayName: string;
|
||||||
|
username: string;
|
||||||
|
email: string;
|
||||||
|
passwordHash: string;
|
||||||
|
bio?: string;
|
||||||
|
profileImageUrl?: string;
|
||||||
|
createdAt: Date;
|
||||||
|
followersCount: number;
|
||||||
|
followingCount: number;
|
||||||
|
refreshTokens: RefreshToken[];
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user