fixed friends template
This commit is contained in:
parent
bbc7cda33f
commit
436331bc72
2 changed files with 13 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue