diff --git a/src/app/routes.rs b/src/app/routes.rs index e9a2201..61f0177 100644 --- a/src/app/routes.rs +++ b/src/app/routes.rs @@ -1,4 +1,3 @@ -use crate::app::components::Container; use leptos::*; pub mod admin; pub mod custom; @@ -30,86 +29,3 @@ fn PlayIcon( } } - -#[component] -fn EpisodeEntry(episode: Episode) -> impl IntoView { - view! { -
- -
-

- {&episode.title} -

- // -

{episode.description}

-
- // - // - // - // - // } - // paused={ - // <> - // - // - // - // } - // /> - - - Show notes - -
-
-
-
- } -} - -#[component] -pub fn Home() -> impl IntoView { - // let episodes = await getAllEpisodes() - let episodes = vec![Episode { - id: "test data".to_string(), - published: "test data".to_string(), - title: "test data".to_string(), - description: "test data".to_string(), - }]; - - view! { -
- -

Episodes

-
-
- {episodes - .into_iter() - .map(|episode| view! { }) - .collect::>()} -
-
- } -} - -struct Episode { - id: String, - published: String, - title: String, - description: String, -} diff --git a/src/app/routes/admin/issue.rs b/src/app/routes/admin/issue.rs index be05ce8..84f6f10 100644 --- a/src/app/routes/admin/issue.rs +++ b/src/app/routes/admin/issue.rs @@ -21,7 +21,7 @@ pub fn Issue() -> impl IntoView { }> {move || { issue - .read() + .get() .map(|data| match data { Err(e) => view! {
{e.to_string()}
}.into_view(), Ok(issue) => { @@ -98,7 +98,7 @@ pub async fn fetch_issue( .into(); let pool = crate::sql::pool()?; - let username = crate::sql::with_admin_access()?; + let _username = crate::sql::with_admin_access()?; let issue = sqlx::query_as!( SqlIssueData, @@ -133,7 +133,7 @@ pub async fn update_issue_metadata( let pool = use_context::() .expect("to be able to access app_state"); - let username = crate::sql::with_admin_access()?; + let _username = crate::sql::with_admin_access()?; let id: [u8; 16] = issue_id .parse::() @@ -304,7 +304,7 @@ fn Showcases() -> impl IntoView { }> {move || { showcases - .read() + .get() .map(|data| match data { Err(e) => view! {
{e.to_string()}
}.into_view(), Ok(showcases) => { diff --git a/src/app/routes/admin/issues.rs b/src/app/routes/admin/issues.rs index c9c30c8..4821418 100644 --- a/src/app/routes/admin/issues.rs +++ b/src/app/routes/admin/issues.rs @@ -45,7 +45,7 @@ pub fn Issues() -> impl IntoView {