pib-viewer 0.3.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 super::Organization;
use dioxus::prelude::{Props, component, dioxus_elements, rsx};
use dioxus_core::Element;
use oparl_types::Organization;

#[derive(Debug, Clone, PartialEq, Props)]
pub struct OrganizationListProps {
    organizations: Vec<Organization>,
}

#[component]
pub fn OrganizationList(props: OrganizationListProps) -> Element {
    rsx! {
        h2 { "Organizations" }

        for organization in props.organizations {
            li {
                key: "{organization.id}",
                Organization { organization }
            }
        }
    }
}