chore: small reorganization to help error appearances

This commit is contained in:
alphafetus committed 2026-01-16 21:27:49 -05:00
1 parent 116d02029c
commit bab6cdae28
1 file changed
+27 -27
+27 -27
View File
@@ -541,19 +541,19 @@ fn ScholarshipForm(
} }
> >
<Suspense fallback=Loading> <Suspense fallback=Loading>
<ValidatedForm {move || {
on_submit=Callback::new(on_submit) scholarship_info
title="Scholarship Info Form" .get()
description="Create or edit a scholarship. Input all information and click Submit." .map(|res_scholarship| {
> match res_scholarship {
{move || { Ok(_) => {
scholarship_info Either::Left(
.get() view! {
.map(|res_scholarship| { <ValidatedForm
match res_scholarship { on_submit=Callback::new(on_submit)
Ok(_) => { title="Scholarship Info Form"
Either::Left( description="Create or edit a scholarship. Input all information and click Submit."
view! { >
<Row> <Row>
<OutlinedTextField <OutlinedTextField
label="Scholarship Name" label="Scholarship Name"
@@ -694,21 +694,21 @@ fn ScholarshipForm(
displayed_text=misc_text displayed_text=misc_text
/> />
</Row> </Row>
}, </ValidatedForm>
) },
} )
Err(err) => {
Either::Right(
view! {
<p>"Error while getting scholarship: "{err.to_string()}</p>
},
)
}
} }
}) Err(err) => {
.collect_view() Either::Right(
}} view! {
</ValidatedForm> <p>"Error while getting scholarship: "{err.to_string()}</p>
},
)
}
}
})
.collect_view()
}}
</Suspense> </Suspense>
</Show> </Show>
</Panel> </Panel>