Adding some routing.
Moving more of the Blog pieces into the Blog library.
This commit is contained in:
16
bard/src/page.rs
Normal file
16
bard/src/page.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use crate::pages::{Blog, Post};
|
||||
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Routable, PartialEq)]
|
||||
#[rustfmt::skip]
|
||||
pub enum Page
|
||||
{
|
||||
#[route("/blog/:tag")]
|
||||
Blog { tag: String },
|
||||
|
||||
#[route("/blog/post/:slug")]
|
||||
Post { slug: String},
|
||||
}
|
||||
Reference in New Issue
Block a user