- useProfileStore(
pinia?: Pinia,
hot?: StoreGeneric,
): Store<
"profile",
UserProfileState,
{
isCurrentUser: (
state: { email: string; username: string } & PiniaCustomStateProperties<
UserProfileState,
>,
) => (email: string) => boolean;
},
{
addWatchedVideo(videoId: string): Promise<boolean>;
getProfileInfo(): Promise<void>;
setUsername(username: string): void;
updateProfileInfo(username: string, bio: string): Promise<boolean>;
},
> Parameters
Optional
pinia: PiniaOptional
hot: StoreGeneric
Returns Store<
"profile",
UserProfileState,
{
isCurrentUser: (
state: { email: string; username: string } & PiniaCustomStateProperties<
UserProfileState,
>,
) => (email: string) => boolean;
},
{
addWatchedVideo(videoId: string): Promise<boolean>;
getProfileInfo(): Promise<void>;
setUsername(username: string): void;
updateProfileInfo(username: string, bio: string): Promise<boolean>;
},
>
Properties
$id
$id: "profile"
Returns a store, creates it if necessary.