File tree 1 file changed +12
-9
lines changed
1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 6
6
branchAtom ,
7
7
githubInfoAtom ,
8
8
octokitAtom ,
9
+ tabAtom ,
9
10
trueFileAtom ,
10
11
trueFilePathAtom ,
11
12
} from '../../atoms/editor' ;
@@ -121,15 +122,17 @@ const EditorTabBar: React.FC<EditorTabBarProps> = ({
121
122
>
122
123
Format Code
123
124
</ button >
124
- < button
125
- className = { classNames (
126
- 'text-gray-400 hover:text-gray-300 hover:bg-gray-800 active:bg-gray-800' ,
127
- 'px-3 py-2 font-medium text-sm focus:outline-none transition'
128
- ) }
129
- onClick = { ( ) => setDialogOpen ( true ) }
130
- >
131
- Add Problem
132
- </ button >
125
+ { useAtomValue ( tabAtom ) === 'problems' && (
126
+ < button
127
+ className = { classNames (
128
+ 'text-gray-400 hover:text-gray-300 hover:bg-gray-800 active:bg-gray-800' ,
129
+ 'px-3 py-2 font-medium text-sm focus:outline-none transition'
130
+ ) }
131
+ onClick = { ( ) => setDialogOpen ( true ) }
132
+ >
133
+ Add Problem
134
+ </ button >
135
+ ) }
133
136
{ githubInfo && octokit && file && branch && (
134
137
< button
135
138
className = { classNames (
You can’t perform that action at this time.
0 commit comments