diff --git a/src/Components/admin/testProblem/TestProblem.jsx b/src/Components/admin/testProblem/TestProblem.jsx index e670fde3e..250e3a7ed 100644 --- a/src/Components/admin/testProblem/TestProblem.jsx +++ b/src/Components/admin/testProblem/TestProblem.jsx @@ -1,12 +1,13 @@ import React, { useState } from 'react'; import { useParams } from 'react-router-dom'; -import Select, { Option } from '@material/react-select'; +import Select from '@material/react-select'; import { Headline4, Body2 } from '@material/react-typography'; import Button from '@material/react-button'; import MessageCard from '../../common/MessageCard/index'; import FileUpload from '../../common/FileUpload/index'; import useSessionExpired from '../../../customHooks/useSessionExpired'; import useSentry from '../../../customHooks/useSentry'; +import { languageOptions } from '../../drawer/contests/status/options'; const TestProblem = () => { const [language, setLanguage] = useState('C'); @@ -16,7 +17,6 @@ const TestProblem = () => { const [messageType, setMessageType] = useState(''); const { redirectOnSessionExpiredAfterRender, isSessionExpired } = useSessionExpired(); const [solutionFile, setSolutionFile] = useState({}); - const onLanguageChange = (index, item) => setLanguage(item.getAttribute('data-value')); const onFileChange = (event) => { setSolutionFile(event.target.files[0]); }; @@ -61,22 +61,17 @@ const TestProblem = () => { {problemId} + options={languageOptions} + onChange={(e) => { + setLanguage(e.target.value); + }} + />