+) -> impl IntoView {
+ view! (
+
+ )
+}
diff --git a/src/pages/about_page.rs b/src/pages/about_page.rs
new file mode 100644
index 0000000..5b03fb9
--- /dev/null
+++ b/src/pages/about_page.rs
@@ -0,0 +1,9 @@
+use leptos::prelude::*;
+
+#[component]
+pub fn AboutPage() -> impl IntoView {
+ view! (
+ About
+ "This is the about page! There isn't anything here yet."
+ )
+}
diff --git a/src/pages/home_page.rs b/src/pages/home_page.rs
index d8267f8..da94b38 100644
--- a/src/pages/home_page.rs
+++ b/src/pages/home_page.rs
@@ -1,19 +1,52 @@
use leptos::prelude::*;
+use aws_sdk_dynamodb as dynamodb;
+use aws_sdk_dynamodb::operation::get_item::GetItemOutput;
+use leptos::server_fn::serde::{Serialize, Deserialize};
+use crate::components::{ActionButton, OutlinedTextField};
-use crate::components::ActionButton;
+#[derive(Serialize, Deserialize, Debug, Clone)]
+pub struct StudentSubmission {
+ testing_value: Option
+}
+
+#[server]
+pub async fn create_sample_submission() -> Result {
+ let config = aws_config::load_defaults().await;
+ let dbclient = aws_sdk_dynamodb::Client::new(&config);
+
+ match dbclient
+ .get_item()
+ .table_name("student-applications")
+ .key("Email", dynamodb::model::AttributeValue::S("google_1234567".to_string()))
+ .send()
+ .await
+ {
+ Ok(output) => {
+ println!("Found submission with passed key.");
+ Ok(StudentSubmission {
+ testing_value: None
+ })
+ }
+ Err(e) => Err(Error::unhandled(e))
+ }
+}
#[component]
pub fn HomePage() -> impl IntoView {
// Creates a reactive value to update the button
let count = RwSignal::new(0);
- let button_disabled = RwSignal::new(false);
+ let elements_disabled = RwSignal::new(false);
let on_click = move |_| {
*count.write() += 1;
- *button_disabled.write() = count.get() == 25;
+ *elements_disabled.write() = count.get() == 10;
};
+ let get_submission = ServerAction::::new();
view! {
"Welcome to Leptos!"
- "Click Me: " {count}
+
+ "Click Me: " {count}
}
}
diff --git a/src/pages/mod.rs b/src/pages/mod.rs
index e1bfcac..9292f57 100644
--- a/src/pages/mod.rs
+++ b/src/pages/mod.rs
@@ -1,5 +1,9 @@
mod home_page;
+mod about_page;
+mod provider_entry;
pub use self::{
- home_page::*
+ home_page::*,
+ about_page::*,
+ provider_entry::*,
};
\ No newline at end of file
diff --git a/src/pages/provider_entry.rs b/src/pages/provider_entry.rs
new file mode 100644
index 0000000..65824c5
--- /dev/null
+++ b/src/pages/provider_entry.rs
@@ -0,0 +1,9 @@
+use leptos::prelude::*;
+
+#[component]
+pub fn ProviderEntry() -> impl IntoView {
+ view! (
+ This is the provider entry page
+ It would usually have a series of questions that we ask the providers
+ )
+}
\ No newline at end of file