fix(front-end): fix current actor not being set on first access when relogging
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
} from "@/graphql/actor";
|
||||
import { IPerson } from "@/types/actor";
|
||||
import { ICurrentUser } from "@/types/current-user.model";
|
||||
import { useQuery } from "@vue/apollo-composable";
|
||||
import { useLazyQuery, useQuery } from "@vue/apollo-composable";
|
||||
import { computed, Ref, unref } from "vue";
|
||||
import { useCurrentUserClient } from "./user";
|
||||
|
||||
@@ -22,6 +22,12 @@ export function useCurrentActorClient() {
|
||||
return { currentActor, error, loading };
|
||||
}
|
||||
|
||||
export function useLazyCurrentUserIdentities() {
|
||||
return useLazyQuery<{
|
||||
loggedUser: Pick<ICurrentUser, "actors">;
|
||||
}>(IDENTITIES);
|
||||
}
|
||||
|
||||
export function useCurrentUserIdentities() {
|
||||
const { currentUser } = useCurrentUserClient();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user