From 2fff37aff7dc5b9f29a19c2207fc961e7b96b8ed Mon Sep 17 00:00:00 2001 From: kasterra Date: Sun, 26 May 2024 18:06:52 +0900 Subject: [PATCH] feat : Class/Function Implementation problem only requires file --- .../$lectureId+/_layout/ProblemAddModal.tsx | 20 +------------------ .../$lectureId+/_layout/ProblemEditModal.tsx | 18 ----------------- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemAddModal.tsx b/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemAddModal.tsx index ae564e9..8a956f3 100644 --- a/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemAddModal.tsx +++ b/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemAddModal.tsx @@ -127,13 +127,7 @@ const ProblemAddModal = ({ postClassImplementationProblem( file, memory, - mainFile - ? { ...mainFileObj, language } - : { - content: codeString, - name: `Main.${getCodeFileExtension(language)}`, - language, - }, + { ...mainFileObj, language }, language, practiceId, time, @@ -256,10 +250,6 @@ const ProblemAddModal = ({ 언어에 맞는 Main 파일을 준비해 주세요. - - 직접 입력하거나(이 경우엔 파일 이름은 - "Main.언어에_맞는_확장자"로 설정됨) 파일을 업로드 해주세요 - - {!mainFile && ( - - )} ) : null} diff --git a/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemEditModal.tsx b/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemEditModal.tsx index fb6e98e..8ad6ca3 100644 --- a/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemEditModal.tsx +++ b/app/routes/_procted+/lectures+/$lectureId+/_layout/ProblemEditModal.tsx @@ -174,12 +174,6 @@ const ProblemEditModal = ({ isOpen, onClose, editingProblemId }: Props) => { undefined, mainFile ? { ...mainFileObj, language } - : codeString - ? { - content: codeString, - name: `Main.${getCodeFileExtension(language)}`, - language, - } : prevProblemInfo!.prepared_main ? { ...prevProblemInfo!.prepared_main.code, @@ -307,10 +301,6 @@ const ProblemEditModal = ({ isOpen, onClose, editingProblemId }: Props) => { 언어에 맞는 Main 파일을 준비해 주세요. - - 직접 입력하거나(이 경우엔 파일 이름은 - "Main.언어에_맞는_확장자"로 설정됨) 파일을 업로드 해주세요 - {prevProblemInfo!.prepared_main && ( <>

기존 main 파일

@@ -345,14 +335,6 @@ const ProblemEditModal = ({ isOpen, onClose, editingProblemId }: Props) => { setMainFile(file); }} /> - {!mainFile && ( - - )} ) : null}