Update navbar component

This commit is contained in:
Hazem Krimi
2021-06-16 02:39:22 +01:00
parent 4965bad1d8
commit a83a6f8160
+18 -18
View File
@@ -22,22 +22,22 @@ const Navbar = () => {
<Link <Link
href='/clients' href='/clients'
color={ color={
new RegExp('/clients', 'i').test(location.pathname) new RegExp('clients', 'i').test(location.pathname)
? 'admin' ? 'admin'
: 'black' : 'black'
} }
selected={new RegExp('/clients', 'i').test(location.pathname)} selected={new RegExp('clients', 'i').test(location.pathname)}
> >
Clients Clients
</Link> </Link>
<Link <Link
href='/product-owners' href='/product-owners'
color={ color={
new RegExp('/product-owners', 'i').test(location.pathname) new RegExp('product-owners', 'i').test(location.pathname)
? 'admin' ? 'admin'
: 'black' : 'black'
} }
selected={new RegExp('/product-owners', 'i').test( selected={new RegExp('product-owners', 'i').test(
location.pathname location.pathname
)} )}
> >
@@ -46,11 +46,11 @@ const Navbar = () => {
<Link <Link
href='/developers' href='/developers'
color={ color={
new RegExp('/developers', 'i').test(location.pathname) new RegExp('developers', 'i').test(location.pathname)
? 'admin' ? 'admin'
: 'black' : 'black'
} }
selected={new RegExp('/developers', 'i').test(location.pathname)} selected={new RegExp('developers', 'i').test(location.pathname)}
> >
Developers Developers
</Link> </Link>
@@ -61,44 +61,44 @@ const Navbar = () => {
<Link <Link
href='/project' href='/project'
color={ color={
new RegExp('/project', 'i').test(location.pathname) new RegExp('project', 'i').test(location.pathname)
? 'developer' ? 'developer'
: 'black' : 'black'
} }
selected={new RegExp('/project', 'i').test(location.pathname)} selected={new RegExp('project', 'i').test(location.pathname)}
> >
Projects Projects
</Link> </Link>
<Link <Link
href='/template' href='/template'
color={ color={
new RegExp('/template', 'i').test(location.pathname) new RegExp('template', 'i').test(location.pathname)
? 'developer' ? 'developer'
: 'black' : 'black'
} }
selected={new RegExp('/template', 'i').test(location.pathname)} selected={new RegExp('template', 'i').test(location.pathname)}
> >
Templates Templates
</Link> </Link>
<Link <Link
href='/feature' href='/feature'
color={ color={
new RegExp('/feature', 'i').test(location.pathname) new RegExp('feature', 'i').test(location.pathname)
? 'developer' ? 'developer'
: 'black' : 'black'
} }
selected={new RegExp('/feature', 'i').test(location.pathname)} selected={new RegExp('feature', 'i').test(location.pathname)}
> >
Features Features
</Link> </Link>
<Link <Link
href='/category' href='/category'
color={ color={
new RegExp('/category', 'i').test(location.pathname) new RegExp('category', 'i').test(location.pathname)
? 'developer' ? 'developer'
: 'black' : 'black'
} }
selected={new RegExp('/category', 'i').test(location.pathname)} selected={new RegExp('category', 'i').test(location.pathname)}
> >
Categories Categories
</Link> </Link>
@@ -109,22 +109,22 @@ const Navbar = () => {
<Link <Link
href='/project' href='/project'
color={ color={
new RegExp('/project', 'i').test(location.pathname) new RegExp('project', 'i').test(location.pathname)
? 'productOwner' ? 'productOwner'
: 'black' : 'black'
} }
selected={new RegExp('/project', 'i').test(location.pathname)} selected={new RegExp('project', 'i').test(location.pathname)}
> >
Projects Projects
</Link> </Link>
<Link <Link
href='/template' href='/template'
color={ color={
new RegExp('/template', 'i').test(location.pathname) new RegExp('template', 'i').test(location.pathname)
? 'productOwner' ? 'productOwner'
: 'black' : 'black'
} }
selected={new RegExp('/template', 'i').test(location.pathname)} selected={new RegExp('template', 'i').test(location.pathname)}
> >
Templates Templates
</Link> </Link>