mv ArticleData to article
This commit is contained in:
parent
9f6256c5cb
commit
7fa3efb478
2 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,13 @@
|
||||||
use crate::components::slingshot::*;
|
|
||||||
use leptos::*;
|
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]
|
#[component]
|
||||||
pub fn Article(data: ArticleData) -> impl IntoView {
|
pub fn Article(data: ArticleData) -> impl IntoView {
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
use leptos::*;
|
use leptos::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use crate::components::article::ArticleData;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
pub struct ArticleData {
|
|
||||||
pub content_type: String,
|
|
||||||
pub title: String,
|
|
||||||
pub date: String, // make datetime?
|
|
||||||
pub content: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[server]
|
#[server]
|
||||||
pub async fn slingshot(path: String) -> Result<Vec<ArticleData>, ServerFnError> {
|
pub async fn slingshot(path: String) -> Result<Vec<ArticleData>, ServerFnError> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue