From 448a523d6422a7bd952a3b76be4f6232b00d7ad6 Mon Sep 17 00:00:00 2001 From: "Sven (AAMOS AI)" Date: Sat, 15 Aug 2026 23:02:30 +0700 Subject: [PATCH] fix(mobile): logga ut ur Firebase vid utloggning (POLISH-1) --- apps/mobile/src/app/profile.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/app/profile.tsx b/apps/mobile/src/app/profile.tsx index 12eef29..42420ad 100644 --- a/apps/mobile/src/app/profile.tsx +++ b/apps/mobile/src/app/profile.tsx @@ -2,6 +2,7 @@ import { Alert } from "react-native"; import { router } from "expo-router"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { api } from "@/lib/api"; +import { firebaseAuthProvider } from "@/lib/auth-provider/firebase"; import { persistLanguageTag, useAuth } from "@/lib/auth"; import { SUPPORTED_LANGUAGES, t } from "@/lib/i18n"; import { @@ -59,7 +60,11 @@ const RELIGIOUS = ["none", "halal", "kosher", "hindu_no_beef", "buddhist_vegetar export default function ProfileScreen() { const queryClient = useQueryClient(); - const logout = useAuth((s) => s.logout); + const rawLogout = useAuth((s) => s.logout); + const logout = async () => { + await firebaseAuthProvider.signOut().catch(() => {}); + await rawLogout(); + }; const me = useQuery({ queryKey: ["me"], queryFn: () => api("/v1/me") }); const entitlements = useQuery({