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 {
21
21
USE_AUTH_ERROR_MESSAGE ,
22
22
USE_MATCH_ERROR_MESSAGE ,
23
23
} from "../../utils/constants" ;
24
- import { isMatchingPage } from "../../utils/url" ;
24
+ import { isMatchingPage , isCollabPage } from "../../utils/url" ;
25
25
import { useMatch } from "../../contexts/MatchContext" ;
26
26
27
27
type NavbarItem = { label : string ; link : string ; needsLogin : boolean } ;
@@ -82,7 +82,9 @@ const Navbar: React.FC<NavbarProps> = (props) => {
82
82
>
83
83
PeerPrep
84
84
</ Typography >
85
- { ! isMatchingPage ( path ) ? (
85
+ { isCollabPage ( path ) ? (
86
+ < > </ >
87
+ ) : ! isMatchingPage ( path ) ? (
86
88
< Stack direction = { "row" } alignItems = { "center" } spacing = { 2 } >
87
89
{ navbarItems
88
90
. 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) => {
2
2
const pattern = / ^ (?< prefix > \/ m a t c h i n g ) (?< ignore > \/ .* ) * $ / ;
3
3
return pattern . test ( path ) ;
4
4
} ;
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