diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 935372d..a1ea3d6 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -72,11 +72,11 @@ const Navbar = () => { Templates @@ -109,22 +109,22 @@ const Navbar = () => { Projects Templates diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index db07a7a..a55bf2f 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -96,7 +96,7 @@ const Sidebar = () => { }); useEffect(() => { - if (/project/i.test(location.pathname)) { + if (/(project|support)/i.test(location.pathname)) { if (role !== 'client') getProjects(); else getProjectsByClientId({ variables: { id: currentUser?.id! } }); } @@ -123,7 +123,7 @@ const Sidebar = () => { const showAddButton = (role: string, pathname: string) => { switch (role) { case 'client': - return /project/i.test(pathname); + return /(project|support)/i.test(pathname); case 'productOwner': return /template/i.test(pathname); case 'developer': @@ -139,7 +139,7 @@ const Sidebar = () => { <> {projects && - new RegExp(/project/, 'i').test(location.pathname) && + new RegExp(/(project|support)/, 'i').test(location.pathname) && projects.map((project, index) => ( @@ -261,7 +261,7 @@ const Sidebar = () => { /> )} - {/project/i.test(location.pathname) && + {/(project|support)/i.test(location.pathname) && ['client', 'productOwner'].includes(role as string) && (