mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
feat(mobile): surface pending questions
Add a conditional Home cue for partner-answered questions and route both the card and catch-up reminders into the pending answer flow. Track prompt engagement and cover hidden, visible, CTA, and notification behavior.
This commit is contained in:
1 parent
9da44217f7
commit
2bc69c2790
7 files changed
+383
-13
No files matched your search
@@ -216,6 +216,10 @@ export const Events = {
|
||||
questionSkipped: () => logEvent("question_skipped"),
|
||||
matchCreated: (matchType: string) => logEvent("match_created", { match_type: matchType }),
|
||||
allQuestionsExhausted: () => logEvent("all_questions_exhausted"),
|
||||
pendingQuestionsPromptViewed: (count: number) =>
|
||||
logEvent("pending_questions_prompt_viewed", { question_count: count }),
|
||||
pendingQuestionsPromptTapped: (count: number) =>
|
||||
logEvent("pending_questions_prompt_tapped", { question_count: count }),
|
||||
|
||||
// Chat events
|
||||
matchViewed: () => logEvent("match_viewed"),
|
||||
|
||||
@@ -23,7 +23,7 @@ Notifications.setNotificationHandler({
|
||||
|
||||
// Types
|
||||
export interface NotificationData {
|
||||
type: "match" | "message" | "match_digest" | "partner_activity" | "nudge" | "weekly_summary";
|
||||
type: "match" | "message" | "match_digest" | "partner_activity" | "nudge" | "weekly_summary" | "catchup_reminder";
|
||||
match_id?: string;
|
||||
message_id?: string;
|
||||
count?: number;
|
||||
@@ -36,6 +36,7 @@ const notificationTypes = new Set<NotificationData["type"]>([
|
||||
"partner_activity",
|
||||
"nudge",
|
||||
"weekly_summary",
|
||||
"catchup_reminder",
|
||||
]);
|
||||
|
||||
function isNotificationData(value: unknown): value is NotificationData {
|
||||
@@ -254,12 +255,18 @@ export function handleNotificationResponse(
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.type === "partner_activity") {
|
||||
if (data.type === "partner_activity") {
|
||||
// Navigate to Matches > Your Turn tab (questions to answer)
|
||||
useMatchStore.getState().setCurrentView('pending');
|
||||
router.push("/(app)/matches");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type === "catchup_reminder") {
|
||||
useMatchStore.getState().setCurrentView('pending');
|
||||
router.push("/(app)/swipe?mode=pending");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.match_id) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user