use dioxus::{
core::Element,
prelude::{Props, component, dioxus_elements, rsx},
};
use crate::client::FooterLink;
#[derive(Debug, Clone, PartialEq, Props)]
pub struct FooterProps {
links: Vec<FooterLink>,
}
#[component]
pub fn Footer(props: FooterProps) -> Element {
const HOMEPAGE_LABEL: &str = concat!(env!("CARGO_PKG_NAME"), " ", env!("CARGO_PKG_VERSION"));
rsx! {
div {
id: "footer",
a {
href: env!("CARGO_PKG_HOMEPAGE"),
"{HOMEPAGE_LABEL}",
}
for footer_link in &props.links {
" | "
a {
href: footer_link.target.clone(),
"{footer_link.label}"
}
}
}
}
}