Merge branch 'main' into feat/date-component
# Conflicts: # src/components/lists/single/radio.rs # src/pages/home_page.rs
This commit is contained in:
commit
0b4aae4db3
6 files changed
+243
-113
No files matched your search
@@ -120,17 +120,23 @@ pub fn ProviderContactPage() -> impl IntoView {
|
||||
|
||||
let mut toasts_context = expect_context::<ToastContext>();
|
||||
Effect::new(move || {
|
||||
submit_action.value().get().is_some()
|
||||
.then(|| {
|
||||
toasts_context.toast(
|
||||
Toast::new()
|
||||
.id(uuid::Uuid::new_v4())
|
||||
.header("Submission Successful")
|
||||
.msg("You can go back or continue editing your responses.")
|
||||
);
|
||||
|
||||
submit_action.clear();
|
||||
});
|
||||
match submit_action.value().get() {
|
||||
Some(Ok(_)) => toasts_context.toast(
|
||||
Toast::new()
|
||||
.id(uuid::Uuid::new_v4())
|
||||
.header("Submission Successful")
|
||||
.msg("You can go back or continue editing your responses.")
|
||||
),
|
||||
Some(Err(err)) => toasts_context.toast(
|
||||
Toast::new()
|
||||
.id(uuid::Uuid::new_v4())
|
||||
.header("Submission Failed")
|
||||
.msg(err.to_string())
|
||||
),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
submit_action.clear();
|
||||
});
|
||||
|
||||
// Display contact form.
|
||||
|
||||
Reference in new issue
Block a user