mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
fix(acquisition): close invite privacy gaps
This commit is contained in:
1 parent
1c7084c033
commit
4a57f31615
15 files changed
+213
-70
No files matched your search
@@ -134,12 +134,12 @@ export default function RootLayout() {
|
||||
const { isAuthenticated, user } = useAuthStore.getState();
|
||||
const onboardingPending = needsOnboarding(user?.onboarding_completed, user?.onboarding_version);
|
||||
if (user?.couple_id) {
|
||||
await import("../src/lib/pendingInviteCode").then(({ clearPendingInviteCode }) => clearPendingInviteCode());
|
||||
await import("../src/lib/pendingInviteCode").then(({ clearPendingInviteCode }) => clearPendingInviteCode(user.id));
|
||||
if (user.couple_id) {
|
||||
router.push({ pathname: "/(app)/pairing", params: { incomingCode: inviteLink.code } });
|
||||
}
|
||||
} else {
|
||||
await stashPendingInviteCode(inviteLink.code);
|
||||
await stashPendingInviteCode(inviteLink.code, user?.id ?? null);
|
||||
if (isAuthenticated && !onboardingPending) {
|
||||
router.push({ pathname: "/(app)/pairing", params: { code: inviteLink.code } });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user