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