diff --git a/src/app.rs b/src/app.rs index f6eb0c2..a9e3785 100644 --- a/src/app.rs +++ b/src/app.rs @@ -5,7 +5,11 @@ use leptos_router::{ StaticSegment, }; -use crate::pages::{AboutPage, HomePage, ProviderEntry}; +use crate::pages::{ + AboutPage, + HomePage, + ProviderEntry +}; pub fn shell(options: LeptosOptions) -> impl IntoView { view! { diff --git a/src/common/loaner_user.rs b/src/common/loaner_user.rs new file mode 100644 index 0000000..ce5cd0b --- /dev/null +++ b/src/common/loaner_user.rs @@ -0,0 +1,19 @@ + +#[derive(Clone)] +pub struct LoanerUser { + pub first_name: String, + pub last_name: String, + pub email: String, + pub has_loan: bool +} + +impl LoanerUser { + pub fn new() -> Self { + LoanerUser { + first_name: "".to_string(), + last_name: "".to_string(), + email: "".to_string(), + has_loan: false + } + } +} diff --git a/src/common/mod.rs b/src/common/mod.rs new file mode 100644 index 0000000..5fafe7c --- /dev/null +++ b/src/common/mod.rs @@ -0,0 +1,7 @@ +mod loaner_user; +mod student_info; + +pub use self::{ + loaner_user::*, + student_info::* +}; diff --git a/src/common/student_info.rs b/src/common/student_info.rs new file mode 100644 index 0000000..a61e51a --- /dev/null +++ b/src/common/student_info.rs @@ -0,0 +1,7 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct StudentInfo { + pub first_name: String, + pub last_name: String, +} diff --git a/src/components/text_field.rs b/src/components/text_field.rs index a0caf3b..ef35c20 100644 --- a/src/components/text_field.rs +++ b/src/components/text_field.rs @@ -12,7 +12,7 @@ pub fn OutlinedTextField(