Skip to content

Commit

Permalink
fixed adding question bug | increased test question modal width (#165)
Browse files Browse the repository at this point in the history
Co-authored-by: Ashesh <[email protected]>
  • Loading branch information
thedevildude and Ashesh3 authored Jan 10, 2024
1 parent 0e8809f commit 71f2b0b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/app/admin/tests/[testsuite_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,12 @@ export default function Page({ params }: { params: { testsuite_id: string } }) {
human_answer: string | undefined,
language: string | undefined,
): void => {
setCurrentQuestion({
question: "",
human_answer: "",
language: "en",
});
TestQuestionsAddMutation.mutate({ question, human_answer, language });
setCurrentQuestion({});
setShowAddQuestion(false);
};

Expand Down Expand Up @@ -824,7 +828,11 @@ export default function Page({ params }: { params: { testsuite_id: string } }) {
</div>
</Modal>

<Modal show={showAddQuestion} onClose={() => setShowAddQuestion(false)}>
<Modal
show={showAddQuestion}
onClose={() => setShowAddQuestion(false)}
className="w-[500px]"
>
<div className="justify-center flex">
<h1 className="block font-medium text-lg">Add Question</h1>
</div>
Expand Down Expand Up @@ -890,7 +898,7 @@ export default function Page({ params }: { params: { testsuite_id: string } }) {
</Button>
<Button
loading={saveBtnLoading}
onClick={() =>
onClick={() => {
handleAddQuestion(
currentQuestion.question,
currentQuestion.human_answer,
Expand Down

0 comments on commit 71f2b0b

Please sign in to comment.