diff --git a/js/src/App.vue b/js/src/App.vue index 37202e3f8..f6d844c87 100644 --- a/js/src/App.vue +++ b/js/src/App.vue @@ -178,7 +178,6 @@ const initializeCurrentUser = () => { const role = localStorage.getItem(AUTH_USER_ROLE); if (userId && userEmail && accessToken && role) { - console.log("Saving current user client from localstorage", role); updateCurrentUser({ id: userId, email: userEmail, @@ -197,19 +196,16 @@ const refreshApp = async ( if (!worker) { return Promise.resolve(); } - console.debug("Doing worker.skipWaiting()."); return new Promise((resolve, reject) => { const channel = new MessageChannel(); channel.port1.onmessage = (event) => { - console.debug("Done worker.skipWaiting()."); if (event.data.error) { reject(event.data); } else { resolve(event.data); } }; - console.debug("calling skip waiting"); worker?.postMessage({ type: "skip-waiting" }, [channel.port2]); }); }; diff --git a/js/src/apollo/user.ts b/js/src/apollo/user.ts index 969e31392..a67cafc73 100644 --- a/js/src/apollo/user.ts +++ b/js/src/apollo/user.ts @@ -99,8 +99,6 @@ export default function buildCurrentUserResolver( }, }; - console.debug("updating current actor", data); - localCache.writeQuery({ data, query: CURRENT_ACTOR_CLIENT }); }, updateCurrentUserLocation: ( diff --git a/js/src/utils/identity.ts b/js/src/utils/identity.ts index af7743768..fd3e61313 100644 --- a/js/src/utils/identity.ts +++ b/js/src/utils/identity.ts @@ -16,7 +16,6 @@ export function saveActorData(obj: IPerson): void { } export async function changeIdentity(identity: IPerson): Promise { - console.debug("Changing identity to", identity); if (!identity.id) return; const { mutate: updateCurrentActorClient } = provideApolloClient( apolloClient @@ -35,21 +34,14 @@ export async function changeIdentity(identity: IPerson): Promise { */ export async function initializeCurrentActor(): Promise { const actorId = localStorage.getItem(AUTH_USER_ACTOR_ID); - console.debug( - "initializing current actor, using actorId from localstorage", - actorId - ); const { result: identitiesResult } = provideApolloClient(apolloClient)(() => useQuery<{ identities: IPerson[] }>(IDENTITIES) ); - console.debug("identitiesResult", identitiesResult); - const identities = computed(() => identitiesResult.value?.identities); watch(identities, async () => { - console.debug("identities found", identities.value); if (identities.value && identities.value.length < 1) { console.warn("Logged user has no identities!"); throw new NoIdentitiesException(); @@ -59,10 +51,7 @@ export async function initializeCurrentActor(): Promise { (identity: IPerson | undefined) => identity?.id === actorId ) || ((identities.value || [])[0] as IPerson); - console.debug("active identity is", activeIdentity); - if (activeIdentity) { - console.debug("active identity found, setting it up"); await changeIdentity(activeIdentity); } }); diff --git a/js/src/views/HomeView.vue b/js/src/views/HomeView.vue index 16cbbe17d..3bc0a8895 100644 --- a/js/src/views/HomeView.vue +++ b/js/src/views/HomeView.vue @@ -374,9 +374,7 @@ onMounted(() => { const router = useRouter(); watch(loggedUser, (loggedUserValue) => { - console.debug("Try to detect empty user settings", loggedUserValue); if (loggedUserValue?.id && loggedUserValue?.settings === null) { - console.debug("No user settings, pushing to onboarding assistant"); router.push({ name: RouteName.WELCOME_SCREEN, params: { step: "1" },