File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,20 @@ function Navigator({ currentUser, hasRepoAccess }: NavigatorProps) {
108
108
pageName = 'accountAdmin'
109
109
}
110
110
111
- return (
112
- < div className = "flex items-center" >
113
- < MyContextSwitcher pageName = { pageName } />
114
- { isCurrentUserPartOfOrg === false ? (
115
- < Label variant = "plain" className = "ml-2 hidden sm:block" >
116
- Viewing as visitor
117
- </ Label >
118
- ) : null }
119
- </ div >
120
- )
111
+ if ( ownerData ) {
112
+ return (
113
+ < div className = "flex items-center" >
114
+ < MyContextSwitcher pageName = { pageName } />
115
+ { isCurrentUserPartOfOrg === false ? (
116
+ < Label variant = "plain" className = "ml-2 hidden sm:block" >
117
+ Viewing as visitor
118
+ </ Label >
119
+ ) : null }
120
+ </ div >
121
+ )
122
+ }
123
+
124
+ return null
121
125
}
122
126
123
127
export default Navigator
You can’t perform that action at this time.
0 commit comments