diff --git a/doordesk/app/src/components/article.rs b/doordesk/app/src/components/article.rs index 72410bb..b617bf9 100644 --- a/doordesk/app/src/components/article.rs +++ b/doordesk/app/src/components/article.rs @@ -1,5 +1,13 @@ -use crate::components::slingshot::*; use leptos::*; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ArticleData { + pub content_type: String, + pub title: String, + pub date: String, // make datetime? + pub content: String, +} #[component] pub fn Article(data: ArticleData) -> impl IntoView { diff --git a/doordesk/app/src/components/slingshot.rs b/doordesk/app/src/components/slingshot.rs index b84602a..91d8689 100644 --- a/doordesk/app/src/components/slingshot.rs +++ b/doordesk/app/src/components/slingshot.rs @@ -1,13 +1,5 @@ use leptos::*; -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct ArticleData { - pub content_type: String, - pub title: String, - pub date: String, // make datetime? - pub content: String, -} +use crate::components::article::ArticleData; #[server] pub async fn slingshot(path: String) -> Result, ServerFnError> {