mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Fix match modal question display
This commit is contained in:
1 parent
3e70669a27
commit
e28dcc1592
2 files changed
+6
-4
No files matched your search
@@ -392,7 +392,7 @@ export default function AppLayout() {
|
|||||||
.eq("id", payload.new.id)
|
.eq("id", payload.new.id)
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
if (matchWithQuestion) {
|
if (matchWithQuestion && matchWithQuestion.question) {
|
||||||
// Track milestone events before adding (so count is accurate)
|
// Track milestone events before adding (so count is accurate)
|
||||||
const currentMatchCount = matches.length;
|
const currentMatchCount = matches.length;
|
||||||
if (currentMatchCount === 0) {
|
if (currentMatchCount === 0) {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ export const MatchNotificationModal: React.FC<Props> = ({
|
|||||||
]).start(() => onChat());
|
]).start(() => onChat());
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!visible || !match) return null;
|
if (!visible || !match || !match.question) return null;
|
||||||
|
|
||||||
// Determine responses based on match_type if not explicitly provided
|
// Determine responses based on match_type if not explicitly provided
|
||||||
const getUserResponse = (): AnswerType => {
|
const getUserResponse = (): AnswerType => {
|
||||||
@@ -266,13 +266,15 @@ export const MatchNotificationModal: React.FC<Props> = ({
|
|||||||
{/* Question text and responses */}
|
{/* Question text and responses */}
|
||||||
{match.question.partner_text ? (
|
{match.question.partner_text ? (
|
||||||
// Two-part question - show what each person saw
|
// Two-part question - show what each person saw
|
||||||
|
// The current user triggered the match (answered second), so they saw partner_text
|
||||||
|
// The partner answered first, so they saw text
|
||||||
<View style={styles.twoPartContainer}>
|
<View style={styles.twoPartContainer}>
|
||||||
<View style={styles.responseSection}>
|
<View style={styles.responseSection}>
|
||||||
<View style={styles.responseLabelRow}>
|
<View style={styles.responseLabelRow}>
|
||||||
<Text style={styles.responsePersonLabel}>You said</Text>
|
<Text style={styles.responsePersonLabel}>You said</Text>
|
||||||
<ResponseBadge response={userResponse} />
|
<ResponseBadge response={userResponse} />
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.questionTextSmall}>"{match.question.text}"</Text>
|
<Text style={styles.questionTextSmall}>"{match.question.partner_text}"</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.matchConnector}>
|
<View style={styles.matchConnector}>
|
||||||
@@ -288,7 +290,7 @@ export const MatchNotificationModal: React.FC<Props> = ({
|
|||||||
<Text style={styles.responsePersonLabel}>{partnerDisplayName} said</Text>
|
<Text style={styles.responsePersonLabel}>{partnerDisplayName} said</Text>
|
||||||
<ResponseBadge response={partnerResponse} isPartner />
|
<ResponseBadge response={partnerResponse} isPartner />
|
||||||
</View>
|
</View>
|
||||||
<Text style={styles.questionTextSmall}>"{match.question.partner_text}"</Text>
|
<Text style={styles.questionTextSmall}>"{match.question.text}"</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in new issue
Block a user