Skip to content

Commit

Permalink
Merge pull request #65 from MoaRoom/feat/#64
Browse files Browse the repository at this point in the history
과제 생성 시 답안, 실행시간 입력란 추가
  • Loading branch information
NayeonKeum committed Aug 30, 2023
2 parents cc1be07 + 087c21d commit ed70500
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 96 deletions.
96 changes: 0 additions & 96 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions src/components/NewAssignment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const newAssignment: FC = () => {
start_date: startDate!.toISOString(),
due_date: dueDate!.toISOString(),
description: data.description,
answer: data.answer,
runtime: data.runtime
};

setUserId(location.state.user_id);
Expand Down Expand Up @@ -164,6 +166,40 @@ const newAssignment: FC = () => {
</p>
)}
</div>
<div className="">
<label className="form-label">답안</label>
<input
type="text"
className="form-control form-control-sm"
id="exampleFormControlInput1"
{...register("answer", {
required: "answer is required!",
})}
/>
{errors.answer && (
<p className="text-danger" style={{ fontSize: 14 }}>
{/* {errors.answer.message} */}
errors.answer.message
</p>
)}
</div>
<div className="">
<label className="form-label">실행시간</label>
<input
type="text"
className="form-control form-control-sm"
id="exampleFormControlInput1"
{...register("runtime", {
required: "runtime is required!",
})}
/>
{errors.runtime && (
<p className="text-danger" style={{ fontSize: 14 }}>
{/* {errors.runtime.message} */}
errors.runtime.message
</p>
)}
</div>

<div className="text-center mt-4 ">
<button
Expand Down

0 comments on commit ed70500

Please sign in to comment.