mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
merge: fix paired state cleanup tests
This commit is contained in:
commit
daefdc6da9
1 file changed
+2
-2
@@ -5,6 +5,7 @@ import { coupleApi } from "../lib/coupleApi";
|
|||||||
import { profileSettingsApi } from "../lib/profileSettingsApi";
|
import { profileSettingsApi } from "../lib/profileSettingsApi";
|
||||||
import { syncTimezone } from "../lib/reportedTimezone";
|
import { syncTimezone } from "../lib/reportedTimezone";
|
||||||
import { Events } from "../lib/analytics";
|
import { Events } from "../lib/analytics";
|
||||||
|
import { clearPairedUnlockSeen } from "../lib/pairedUnlockSeen";
|
||||||
import type { Profile, Couple } from "@/types";
|
import type { Profile, Couple } from "@/types";
|
||||||
|
|
||||||
export interface AuthSessionSnapshot {
|
export interface AuthSessionSnapshot {
|
||||||
@@ -206,7 +207,6 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
|||||||
const unlockUserId = get().user?.id;
|
const unlockUserId = get().user?.id;
|
||||||
const unlockCoupleId = get().couple?.id ?? get().user?.couple_id ?? null;
|
const unlockCoupleId = get().couple?.id ?? get().user?.couple_id ?? null;
|
||||||
if (unlockUserId) {
|
if (unlockUserId) {
|
||||||
const { clearPairedUnlockSeen } = await import("../lib/pairedUnlockSeen");
|
|
||||||
await clearPairedUnlockSeen(unlockUserId, unlockCoupleId);
|
await clearPairedUnlockSeen(unlockUserId, unlockCoupleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
|
|||||||
// Clear other stores when user signs out
|
// Clear other stores when user signs out
|
||||||
if (user === null) {
|
if (user === null) {
|
||||||
if (priorUserId) {
|
if (priorUserId) {
|
||||||
void import("../lib/pairedUnlockSeen").then(({ clearPairedUnlockSeen }) => clearPairedUnlockSeen(priorUserId, priorCoupleId));
|
void clearPairedUnlockSeen(priorUserId, priorCoupleId);
|
||||||
}
|
}
|
||||||
const { useMatchStore, usePacksStore, useMessageStore, useSubscriptionStore, useNotificationPreferencesStore, useStreakStore, useResponsesStore, useQuizStore } = getOtherStores();
|
const { useMatchStore, usePacksStore, useMessageStore, useSubscriptionStore, useNotificationPreferencesStore, useStreakStore, useResponsesStore, useQuizStore } = getOtherStores();
|
||||||
useMatchStore.getState().clearMatches();
|
useMatchStore.getState().clearMatches();
|
||||||
|
|||||||
Reference in new issue
Block a user