You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
494 B
Rust
16 lines
494 B
Rust
//! Author page — all quotes by a specific author.
|
|
use yew::prelude::*;
|
|
|
|
/// Props for the [`AuthorPage`] component.
|
|
#[derive(Properties, PartialEq)]
|
|
pub struct AuthorPageProps {
|
|
/// The author name from the route parameter.
|
|
pub name: String,
|
|
}
|
|
|
|
/// Author page component. Lists all quotes attributed to the given author.
|
|
#[function_component(AuthorPage)]
|
|
pub fn author_page(props: &AuthorPageProps) -> Html {
|
|
html! { <p>{ format!("Loading quotes by {}...", props.name) }</p> }
|
|
}
|