fixed friends template

This commit is contained in:
Maieul BOYER 2026-02-08 14:20:09 +01:00
parent bbc7cda33f
commit 436331bc72
Signed by: maix
SSH key fingerprint: SHA256:iqCzqFFF5KjRixmDExqbAltCIj9ndlBWIGJf3t9Ln9g
2 changed files with 13 additions and 7 deletions

View file

@ -6,12 +6,12 @@ fn main() {
let data = friends::render(
&env,
friends::FriendsData {
friends: std::iter::from_fn(|| Some(Friend {
friends: std::array::from_fn::<_, 10, _>(|i| Friend {
name: "maiboyer".into(),
image: "https://friends.42paris.fr/proxy/resize/512/03c61af252becbca11aac5ff49a2e61c/maiboyer.jpg".into(),
position: Some("f1r1s1".into()),
last_active: None,
})).take(10).collect(),
position: (i < 5).then_some("f1r1s1".into()),
last_active: (i > 6).then_some("Last thuesday".into()),
}).to_vec(),
},
)
.unwrap();