Leptos updated to 0.6.5
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
use crate::backend::data::ApiResponse;
|
||||
use crate::components::modal_box::{DialogOpener, ModalBody, ModalDialog, ModalFooter};
|
||||
use leptos::*;
|
||||
use leptos::server_fn::client::browser::BrowserClient;
|
||||
use leptos::server_fn::codec::{Json, PostUrl};
|
||||
use leptos::server_fn::error::NoCustomError;
|
||||
use leptos::server_fn::ServerFn;
|
||||
use leptos_router::*;
|
||||
use serde::de::DeserializeOwned;
|
||||
use validator::Validate;
|
||||
use crate::components::server_err::ServerErr;
|
||||
use crate::components::validation_err::ValidationErr;
|
||||
@@ -13,7 +18,13 @@ pub trait ForValidation {
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn data_form<T: 'static + server_fn::ServerFn<()> + Clone + ForValidation>(
|
||||
pub fn data_form<T: 'static + Clone +
|
||||
ServerFn<Client = BrowserClient,
|
||||
InputEncoding = PostUrl,
|
||||
OutputEncoding = Json,
|
||||
Error = NoCustomError,
|
||||
Output = ApiResponse<()>> +
|
||||
DeserializeOwned + ForValidation>(
|
||||
opener: DialogOpener,
|
||||
action: Action<T, Result<ApiResponse<()>, ServerFnError>>,
|
||||
title: &'static str,
|
||||
@@ -54,7 +65,14 @@ pub fn data_form<T: 'static + server_fn::ServerFn<()> + Clone + ForValidation>(
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn question_dialog<T: 'static + server_fn::ServerFn<()> + Clone>(
|
||||
pub fn question_dialog<T: 'static
|
||||
+ ServerFn<Client = BrowserClient,
|
||||
InputEncoding = PostUrl,
|
||||
OutputEncoding = Json,
|
||||
Error = NoCustomError,
|
||||
Output = ApiResponse<()>>
|
||||
+ DeserializeOwned
|
||||
+ Clone>(
|
||||
opener: DialogOpener,
|
||||
action: Action<T, Result<ApiResponse<()>, ServerFnError>>,
|
||||
title: &'static str,
|
||||
|
||||
Reference in New Issue
Block a user