diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-30 10:01:30 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-30 10:01:30 +0530 |
commit | 5d510a8258c07598ab4bfe840c820035583bd0a8 (patch) | |
tree | 7cba224fe0a8e1f0c663018dfd5adbbdcffcd0c3 | |
parent | 119f64b29c0147f86f63e18e14818c41e4bdefdd (diff) |
using keyed list in navigation_menu
-rw-r--r-- | src/components/navigation_menu/menu_items.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/navigation_menu/menu_items.rs b/src/components/navigation_menu/menu_items.rs index f3e33b3..d86fb56 100644 --- a/src/components/navigation_menu/menu_items.rs +++ b/src/components/navigation_menu/menu_items.rs @@ -37,7 +37,7 @@ pub struct Props { pub fn menu_items(props: &Props) -> Html { let menu_items: Html = props.items .iter() - .map(|item| html!(<menu_item::MenuItem icon={item.icon} label={item.label.clone()} to={item.to.clone()} />)) + .map(|item| html!(<menu_item::MenuItem key={item.label.clone()} icon={item.icon} label={item.label.clone()} to={item.to.clone()} />)) .collect(); html! { |