|
|
|
@ -266,10 +266,12 @@ function formatBoldText(text: string) { |
|
|
|
|
|
|
|
type NewMatchProfilePageProps = { |
|
|
|
onClose?: () => void; |
|
|
|
profile?: MarriageProfile; |
|
|
|
}; |
|
|
|
|
|
|
|
export default function NewMatchProfilePage({ |
|
|
|
onClose, |
|
|
|
profile: profileProp, |
|
|
|
}: NewMatchProfilePageProps = {}) { |
|
|
|
const { dictionary: t, locale } = useI18n(); |
|
|
|
const router = useRouter(); |
|
|
|
@ -280,10 +282,15 @@ export default function NewMatchProfilePage({ |
|
|
|
const [isDismissReasonSheetOpen, setIsDismissReasonSheetOpen] = |
|
|
|
useState(false); |
|
|
|
const { |
|
|
|
data: profile, |
|
|
|
isLoading, |
|
|
|
data: queriedProfile, |
|
|
|
isLoading: isQueryLoading, |
|
|
|
refetch: refetchProfile, |
|
|
|
} = useMarriageProfileQuery(); |
|
|
|
} = useMarriageProfileQuery({ |
|
|
|
enabled: !profileProp, |
|
|
|
}); |
|
|
|
|
|
|
|
const profile = profileProp ?? queriedProfile; |
|
|
|
const isLoading = !profileProp && isQueryLoading; |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if (!profile) { |
|
|
|
|