diff --git a/front/src/components/list_groups.rs b/front/src/components/list_groups.rs index 4b15ccf..154a5e2 100644 --- a/front/src/components/list_groups.rs +++ b/front/src/components/list_groups.rs @@ -1,6 +1,6 @@ use gloo_net::http::Request; use gloo_net::Error; -use patternfly_yew::ToastViewer; +use patternfly_yew::{Button, Flex, FlexModifier, Gallery, ToastViewer, ToFlexItems, Variant, WithBreakpointExt}; use yew::prelude::*; use crate::components::{Group, Home, TestMessage, ToastFields, ToastType}; @@ -68,24 +68,39 @@ impl Component for ListGroups { } let onclick = ctx.link().callback(|_| MsgListGroups::More); + let groups: Vec = self.groups[..self.nb_show].iter().map(|group| { html!{ +
{ group.name.clone() }
- } }).collect::() - } + html!{ - if self.nb_show < self.groups.len() { - +{ "Vous n'ĂȘtes dans aucun groupe." }
} - //{ "coucou" }
> } } diff --git a/front/src/main.rs b/front/src/main.rs index ff603b6..be164ae 100644 --- a/front/src/main.rs +++ b/front/src/main.rs @@ -1,6 +1,6 @@ mod components; -use components::*; +use components::Home; use gloo_net::http::Request; use gloo_storage::{LocalStorage, Storage};