mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update navbar component
This commit is contained in:
@@ -21,24 +21,36 @@ const Navbar = () => {
|
|||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
href='/clients'
|
href='/clients'
|
||||||
color={location.pathname === '/clients' ? 'admin' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/clients'}
|
new RegExp('/clients', 'i').test(location.pathname)
|
||||||
|
? 'admin'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/clients', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Clients
|
Clients
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/product-owners'
|
href='/product-owners'
|
||||||
color={
|
color={
|
||||||
location.pathname === '/product-owners' ? 'admin' : 'black'
|
new RegExp('/product-owners', 'i').test(location.pathname)
|
||||||
|
? 'admin'
|
||||||
|
: 'black'
|
||||||
}
|
}
|
||||||
selected={location.pathname === '/product-owners'}
|
selected={new RegExp('/product-owners', 'i').test(
|
||||||
|
location.pathname
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
Product Owners
|
Product Owners
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/developers'
|
href='/developers'
|
||||||
color={location.pathname === '/developers' ? 'admin' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/developers'}
|
new RegExp('/developers', 'i').test(location.pathname)
|
||||||
|
? 'admin'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/developers', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Developers
|
Developers
|
||||||
</Link>
|
</Link>
|
||||||
@@ -48,29 +60,45 @@ const Navbar = () => {
|
|||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
href='/project'
|
href='/project'
|
||||||
color={location.pathname === '/project' ? 'developer' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/project'}
|
new RegExp('/project', 'i').test(location.pathname)
|
||||||
|
? 'developer'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/project', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Projects
|
Projects
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/template'
|
href='/template'
|
||||||
color={location.pathname === '/template' ? 'developer' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/template'}
|
new RegExp('/template', 'i').test(location.pathname)
|
||||||
|
? 'developer'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/template', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Templates
|
Templates
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/feature'
|
href='/feature'
|
||||||
color={location.pathname === '/feature' ? 'developer' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/feature'}
|
new RegExp('/feature', 'i').test(location.pathname)
|
||||||
|
? 'developer'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/feature', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Features
|
Features
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/category'
|
href='/category'
|
||||||
color={location.pathname === '/category' ? 'developer' : 'black'}
|
color={
|
||||||
selected={location.pathname === '/category'}
|
new RegExp('/category', 'i').test(location.pathname)
|
||||||
|
? 'developer'
|
||||||
|
: 'black'
|
||||||
|
}
|
||||||
|
selected={new RegExp('/category', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Categories
|
Categories
|
||||||
</Link>
|
</Link>
|
||||||
@@ -81,18 +109,22 @@ const Navbar = () => {
|
|||||||
<Link
|
<Link
|
||||||
href='/project'
|
href='/project'
|
||||||
color={
|
color={
|
||||||
location.pathname === '/project' ? 'productOwner' : 'black'
|
new RegExp('/project', 'i').test(location.pathname)
|
||||||
|
? 'productOwner'
|
||||||
|
: 'black'
|
||||||
}
|
}
|
||||||
selected={location.pathname === '/project'}
|
selected={new RegExp('/project', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Projects
|
Projects
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/template'
|
href='/template'
|
||||||
color={
|
color={
|
||||||
location.pathname === '/template' ? 'productOwner' : 'black'
|
new RegExp('/template', 'i').test(location.pathname)
|
||||||
|
? 'productOwner'
|
||||||
|
: 'black'
|
||||||
}
|
}
|
||||||
selected={location.pathname === '/template'}
|
selected={new RegExp('/template', 'i').test(location.pathname)}
|
||||||
>
|
>
|
||||||
Templates
|
Templates
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user