Mahdi Naser Moghadasi commited on
Commit
94bc8a6
·
1 Parent(s): 1a2a28c

Remove final JavaScript and C++ references from dropdown and Monaco Editor

Browse files

- Remove javascript and cpp options from language selector dropdown
- Remove cpp-specific language prop handling in Monaco Editor

Files changed (1) hide show
  1. components/CodeEditor.tsx +1 -3
components/CodeEditor.tsx CHANGED
@@ -197,9 +197,7 @@ export default function CodeEditor({
197
  className="ml-4 text-sm text-gray-300 bg-gray-700 border border-gray-600 rounded px-2 py-1 focus:outline-none focus:ring-2 focus:ring-primary-500"
198
  >
199
  <option value="python">Python</option>
200
- <option value="javascript">JavaScript</option>
201
  <option value="java">Java</option>
202
- <option value="cpp">C++</option>
203
  </select>
204
  </div>
205
  <div id="tour-run-submit-buttons" className="flex items-center gap-2">
@@ -294,7 +292,7 @@ export default function CodeEditor({
294
  <div className="h-full w-full [&_.monaco-editor_.scroll-decoration]:hidden [&_.monaco-editor]:h-full [&_.monaco-scrollable-element]:h-full">
295
  <MonacoEditor
296
  height="100%"
297
- language={selectedLanguage === 'cpp' ? 'cpp' : selectedLanguage}
298
  value={code || ''}
299
  onChange={onChange}
300
  theme="vs-dark"
 
197
  className="ml-4 text-sm text-gray-300 bg-gray-700 border border-gray-600 rounded px-2 py-1 focus:outline-none focus:ring-2 focus:ring-primary-500"
198
  >
199
  <option value="python">Python</option>
 
200
  <option value="java">Java</option>
 
201
  </select>
202
  </div>
203
  <div id="tour-run-submit-buttons" className="flex items-center gap-2">
 
292
  <div className="h-full w-full [&_.monaco-editor_.scroll-decoration]:hidden [&_.monaco-editor]:h-full [&_.monaco-scrollable-element]:h-full">
293
  <MonacoEditor
294
  height="100%"
295
+ language={selectedLanguage}
296
  value={code || ''}
297
  onChange={onChange}
298
  theme="vs-dark"