fix: re-add user fetch for enter details
This commit is contained in:
@@ -43,6 +43,8 @@ export default function StepPage({
|
|||||||
language: params.lang,
|
language: params.lang,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { data: userData } = trpc.user.getSafely.useQuery()
|
||||||
|
|
||||||
if (loadingHotel) {
|
if (loadingHotel) {
|
||||||
return <LoadingSpinner />
|
return <LoadingSpinner />
|
||||||
}
|
}
|
||||||
@@ -70,6 +72,11 @@ export default function StepPage({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let user = null
|
||||||
|
if (userData && !("error" in userData)) {
|
||||||
|
user = userData
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<SectionAccordion
|
<SectionAccordion
|
||||||
@@ -97,7 +104,7 @@ export default function StepPage({
|
|||||||
label={intl.formatMessage({ id: "Enter your details" })}
|
label={intl.formatMessage({ id: "Enter your details" })}
|
||||||
path="/details"
|
path="/details"
|
||||||
>
|
>
|
||||||
<Details user={null} />
|
<Details user={user} />
|
||||||
</SectionAccordion>
|
</SectionAccordion>
|
||||||
<SectionAccordion
|
<SectionAccordion
|
||||||
header="Payment"
|
header="Payment"
|
||||||
|
|||||||
Reference in New Issue
Block a user