mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Update
This commit is contained in:
1 parent
d1a2032724
commit
dfcf0ba289
10 files changed
+630
-28
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { create } from "zustand";
|
||||
import { supabase } from "../lib/supabase";
|
||||
import { Events } from "../lib/analytics";
|
||||
import revenueCatService, {
|
||||
SubscriptionState,
|
||||
PurchasesPackage,
|
||||
@@ -87,6 +88,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
||||
},
|
||||
|
||||
signOut: async () => {
|
||||
Events.signOut();
|
||||
// Clear local state FIRST to ensure UI updates even if Supabase call fails
|
||||
set({
|
||||
user: null,
|
||||
@@ -337,6 +339,13 @@ export const usePacksStore = create<PacksState>((set, get) => ({
|
||||
return { success: false, reason: "error" };
|
||||
}
|
||||
|
||||
// Track pack enable/disable
|
||||
if (newValue) {
|
||||
Events.packEnabled(packId);
|
||||
} else {
|
||||
Events.packDisabled(packId);
|
||||
}
|
||||
|
||||
return { success: true };
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user