From 2e767da17d6c70eccbdfb3ce5e92cec7f01b75e8 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Mon, 14 Jun 2021 02:20:46 +0100 Subject: [PATCH] Update sidebar component --- src/components/Sidebar/index.tsx | 44 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index ceda1ff..7b83a6e 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -105,78 +105,82 @@ const Sidebar = () => { <> {projects && - projects.map((project) => ( + projects.map((project, index) => (
history.push(`/project/${project.id}`)} />
{}, label: project.name }]} + items={[{ label: project.name }]} />
))} {templates && - templates.map((template) => ( + templates.map((template, index) => (
history.push(`/template/${template.id}`)} />
{}, label: template.name }]} + items={[{ label: template.name }]} />
))} {features && - features.map((feature) => ( + features.map((feature, index) => (
history.push(`/feature/${feature.id}`)} />
{}, label: feature.name }]} + items={[{ label: feature.name }]} />
))} {categories && - categories.map((category) => ( + categories.map((category, index) => (
history.push(`/category/${category.id}`)} />
{}, label: category.name }]} + items={[{ label: category.name }]} />
))}