pib-viewer 0.8.0

A viewer for public governmental data served over OParl
// SPDX-FileCopyrightText: Politik im Blick developers
// SPDX-FileCopyrightText: Wolfgang Silbermayr <wolfgang@silbermayr.at>
//
// SPDX-License-Identifier: AGPL-3.0-or-later OR EUPL-1.2

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 {
    rsx! {
        div {
            id: "footer",

            for (index, footer_link) in props.links.iter().enumerate() {
                if index > 0 {
                    " | "
                }
                a {
                    href: footer_link.target.clone(),

                    "{footer_link.label}"
                }
            }
        }
    }
}