File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import {
2121 USE_AUTH_ERROR_MESSAGE ,
2222 USE_MATCH_ERROR_MESSAGE ,
2323} from "../../utils/constants" ;
24- import { isMatchingPage } from "../../utils/url" ;
24+ import { isMatchingPage , isCollabPage } from "../../utils/url" ;
2525import { useMatch } from "../../contexts/MatchContext" ;
2626
2727type NavbarItem = { label : string ; link : string ; needsLogin : boolean } ;
@@ -82,7 +82,9 @@ const Navbar: React.FC<NavbarProps> = (props) => {
8282 >
8383 PeerPrep
8484 </ Typography >
85- { ! isMatchingPage ( path ) ? (
85+ { isCollabPage ( path ) ? (
86+ < > </ >
87+ ) : ! isMatchingPage ( path ) ? (
8688 < Stack direction = { "row" } alignItems = { "center" } spacing = { 2 } >
8789 { navbarItems
8890 . filter ( ( item ) => ! item . needsLogin || ( item . needsLogin && user ) )
Original file line number Diff line number Diff line change @@ -2,3 +2,8 @@ export const isMatchingPage = (path: string) => {
22 const pattern = / ^ (?< prefix > \/ m a t c h i n g ) (?< ignore > \/ .* ) * $ / ;
33 return pattern . test ( path ) ;
44} ;
5+
6+ export const isCollabPage = ( path : string ) => {
7+ const pattern = / ^ (?< prefix > \/ c o l l a b o r a t i o n ) (?< ignore > \/ .* ) * $ / ;
8+ return pattern . test ( path ) ;
9+ } ;
You can’t perform that action at this time.
0 commit comments