-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from CSID-DGU/frontend/feature/add-exam
FE: [feat] 수험자 화면 API 연결
- Loading branch information
Showing
18 changed files
with
275 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { apiWithoutAuth } from "."; | ||
import { RESTYPE } from "@/types/common"; | ||
import { ExamRequest, ExamResponse } from "@/types/exam"; | ||
|
||
export const enterSession = async ( | ||
data: ExamRequest | ||
): Promise<RESTYPE<ExamResponse>> => { | ||
const response = await apiWithoutAuth.post(`/sessions/join`, data); | ||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { apiWithoutAuth } from "."; | ||
import { RESTYPE } from "@/types/common"; | ||
import { UserInfoRequest, UserInfoResponse } from "@/types/exam"; | ||
|
||
export const userInformation = async ( | ||
data: UserInfoRequest | ||
): Promise<RESTYPE<UserInfoResponse>> => { | ||
const response = await apiWithoutAuth.post(`/sessions/student`, data); | ||
return response.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import NextButton from "@/components/common/NextButton"; | ||
import SubHeader from "@/components/common/SubHeader"; | ||
import ExamCard from "@/components/notice/ExamCard"; | ||
import NoticeCard from "@/components/notice/NoticeCard"; | ||
|
||
const NoticePage = () => { | ||
return ( | ||
<div> | ||
<SubHeader title="시험 유의사항" /> | ||
<div className="flex flex-col items-center"> | ||
<NoticeCard /> | ||
<ExamCard /> | ||
</div> | ||
<div className="fixed bottom-6 right-0"> | ||
<NextButton title="NEXT" isAvailable={true} action="/agreement" /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NoticePage; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/frontend/eyesee-user/src/components/notice/ExamCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"use client"; | ||
|
||
import { useExamStore } from "@/store/useExamStore"; | ||
|
||
const ExamCard = () => { | ||
const { exam } = useExamStore(); | ||
|
||
return ( | ||
<div className="mt-8 py-[26px] px-[20px] bg-[#0E1D3C] shadow-lg flex flex-col rounded-ss-2xl rounded-ee-2xl"> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">강의명</div> | ||
<div className="text-[12px] font-semibold">{exam.examName}</div> | ||
</div> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">담당 교수</div> | ||
<div className="text-[12px] font-semibold">확인중</div> | ||
</div> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">시험 시작시간</div> | ||
<div className="text-[12px] font-semibold">{exam.examStartTime}</div> | ||
</div> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">진행 시간</div> | ||
<div className="text-[12px] font-semibold">{exam.examDuration}분</div> | ||
</div> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">문제 수</div> | ||
<div className="text-[12px] font-semibold">확인 중</div> | ||
</div> | ||
<div className="text-white flex items-center py-3 border-b border-white px-3"> | ||
<div className="text-[14px] w-[25vw]">총 점수</div> | ||
<div className="text-[12px] font-semibold">확인 중</div> | ||
</div> | ||
<div className="text-white text-[10px] mt-3"> | ||
※ 카메라 권한을 허용해야 합니다. | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ExamCard; |
21 changes: 21 additions & 0 deletions
21
src/frontend/eyesee-user/src/components/notice/NoticeCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import InfoIcon from "@/assets/icons/InfoIcon.svg"; | ||
|
||
const NoticeCard = () => { | ||
return ( | ||
<div className="w-[80vw] mt-8 py-5 rounded-xl bg-[rgba(14,29,60,0.1)]"> | ||
<div className="flex items-center justify-center gap-1 text-black font-semibold text-[14px] text-center mb-3"> | ||
<p>유의사항</p> | ||
<InfoIcon /> | ||
</div> | ||
<div className="text-[10px] font-light text-black text-center"> | ||
시험 정보는 시험 감독자(관리자)가 입력한 정보입니다. | ||
<br /> | ||
아래 기재된 정보와 관련하여 궁금한 사항은 | ||
<br /> | ||
시험장에 상주하는 관리자를 통해 확인하시기 바랍니다. | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NoticeCard; |
Oops, something went wrong.