-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NDD-135] Interview 페이지 UI 구현 #57
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bd5f4ee
feat: Interview Header 컴포넌트 개발
adultlee 28f1cf6
feat: InterviewCamera 컴포넌트 개발
adultlee 037138c
feat: InterviewFooter 컴포넌트 개발
adultlee 83c5052
feat: 최소 로직에 대한 기능 구현
adultlee 616f6fa
style: components/interviewPage의 컴포넌트 구조변경
adultlee 50c5db0
fix: Typograpy 디자인 반영
adultlee 599eda1
fix: 저장하기 로직 예외처리
adultlee 3387a54
style: Interview 페이지 내부 theme 적용
adultlee dee8500
feat: 면접 종료 Modal 구현
adultlee 249c75b
fix: InterviewPageFooter의 Button 간격 수정
adultlee 12ef38b
feat: InterviewIntro 모달 구현
adultlee 315cab6
fix: Interview Intro 모달의 문구 변경
adultlee cea459d
feat: interview finish 모달 구현
adultlee dcba246
feat: InterviewTimeOver 모달 구현
adultlee 8960cfb
feat: Interview 페이지 내부 false 상태로 modal 적용
adultlee 8fc8ae5
fix: record-stop 버튼에 대한 버그 수정
adultlee c72b53e
feat: 위로 스크롤시 배경이 가려지는 문제 해결
adultlee b663055
fix: 상단에 Question 고정
adultlee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
FE/src/components/interviewPage/InterviewFooter/AnswerToggleButton.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,31 @@ | ||
import { css } from '@emotion/react'; | ||
import { theme } from '@styles/theme'; | ||
import Icon from '@foundation/Icon/Icon'; | ||
import Typography from '@foundation/Typography/Typography'; | ||
|
||
type AnswerToggleButtonType = { | ||
handleAnswerToggle: () => void; | ||
}; | ||
|
||
const AnswerToggleButton: React.FC<AnswerToggleButtonType> = ({ | ||
handleAnswerToggle, | ||
}) => { | ||
return ( | ||
<div | ||
css={css` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.75rem; | ||
`} | ||
onClick={handleAnswerToggle} | ||
> | ||
<Icon id="script" width="2rem" height="2rem" /> | ||
<Typography variant={'body1'} color={theme.colors.text.white}> | ||
스크립트 | ||
</Typography> | ||
</div> | ||
); | ||
}; | ||
export default AnswerToggleButton; |
32 changes: 32 additions & 0 deletions
32
FE/src/components/interviewPage/InterviewFooter/InterviewExitButton.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,32 @@ | ||
import { theme } from '@styles/theme'; | ||
import { css } from '@emotion/react'; | ||
|
||
import Icon from '@foundation/Icon/Icon'; | ||
import Typography from '@foundation/Typography/Typography'; | ||
|
||
type InterviewExitButtonType = { | ||
handleInterviewExit: () => void; | ||
}; | ||
|
||
const InterviewExitButton: React.FC<InterviewExitButtonType> = ({ | ||
handleInterviewExit, | ||
}) => { | ||
return ( | ||
<div | ||
css={css` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.75rem; | ||
`} | ||
onClick={handleInterviewExit} | ||
> | ||
<Icon id="close-circle" width="2rem" height="2rem" /> | ||
<Typography variant={'body1'} color={theme.colors.text.white}> | ||
나가기 | ||
</Typography> | ||
</div> | ||
); | ||
}; | ||
export default InterviewExitButton; |
65 changes: 65 additions & 0 deletions
65
FE/src/components/interviewPage/InterviewFooter/InterviewFooter.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,65 @@ | ||
import { css } from '@emotion/react'; | ||
import InterviewExitButton from './InterviewExitButton'; | ||
import AnswerToggleButton from './AnswerToggleButton'; | ||
import RecordControlButton from './RecordControlButton'; | ||
import NextButton from './NextButton'; | ||
import InterviewExitModal from '@components/interviewPage/InterviewModal/InterviewExitModal'; | ||
import { useState } from 'react'; | ||
import { theme } from '@styles/theme'; | ||
|
||
type InterviewFooterProps = { | ||
isRecording: boolean; | ||
recordedBlobs: Blob[]; | ||
handleStartRecording: () => void; | ||
handleStopRecording: () => void; | ||
handleScript: () => void; | ||
handleDownload: () => void; | ||
}; | ||
|
||
const InterviewFooter: React.FC<InterviewFooterProps> = ({ | ||
isRecording, | ||
recordedBlobs, | ||
handleStartRecording, | ||
handleStopRecording, | ||
handleScript, | ||
handleDownload, | ||
}) => { | ||
const [interviewExitModalIsOpen, setInterviewExitModalIsOpen] = | ||
useState<boolean>(false); | ||
|
||
const handleNext = () => { | ||
alert('다음면접을 진행합니다'); | ||
if (!isRecording && recordedBlobs.length > 0) handleDownload(); | ||
else alert('저장할 수 없습니다'); | ||
}; | ||
|
||
return ( | ||
<div | ||
css={css` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 6.25rem; | ||
background-color: ${theme.colors.surface.black100}; | ||
gap: 2.5rem; | ||
`} | ||
> | ||
<InterviewExitButton | ||
handleInterviewExit={() => setInterviewExitModalIsOpen(true)} | ||
/> | ||
<AnswerToggleButton handleAnswerToggle={handleScript} /> | ||
<RecordControlButton | ||
isRecording={isRecording} | ||
handleStartRecording={handleStartRecording} | ||
handleStopRecording={handleStopRecording} | ||
/> | ||
<NextButton handleNext={handleNext} /> | ||
<InterviewExitModal | ||
isOpen={interviewExitModalIsOpen} | ||
closeModal={() => setInterviewExitModalIsOpen((prev) => !prev)} | ||
/> | ||
</div> | ||
); | ||
}; | ||
export default InterviewFooter; |
34 changes: 34 additions & 0 deletions
34
FE/src/components/interviewPage/InterviewFooter/NextButton.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,34 @@ | ||
import { theme } from '@styles/theme'; | ||
import { css } from '@emotion/react'; | ||
|
||
import Icon from '@foundation/Icon/Icon'; | ||
import Typography from '@foundation/Typography/Typography'; | ||
|
||
type NextButtonType = { | ||
handleNext: () => void; | ||
}; | ||
|
||
const NextButton: React.FC<NextButtonType> = ({ handleNext }) => { | ||
return ( | ||
<div | ||
css={css` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.75rem; | ||
`} | ||
onClick={handleNext} | ||
> | ||
<Icon | ||
id="next" // symbol 옆에 작성한 id를 인자로 받습니다. | ||
width="2rem" | ||
height="2rem" | ||
/> | ||
<Typography variant={'body1'} color={theme.colors.text.white}> | ||
다음질문 | ||
</Typography> | ||
</div> | ||
); | ||
}; | ||
export default NextButton; |
39 changes: 39 additions & 0 deletions
39
FE/src/components/interviewPage/InterviewFooter/RecordControlButton.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,39 @@ | ||
import { theme } from '@styles/theme'; | ||
import { css } from '@emotion/react'; | ||
import Icon from '@foundation/Icon/Icon'; | ||
import Typography from '@foundation/Typography/Typography'; | ||
|
||
type RecordControlButtonType = { | ||
isRecording: boolean; | ||
handleStartRecording: () => void; | ||
handleStopRecording: () => void; | ||
}; | ||
|
||
const RecordControlButton: React.FC<RecordControlButtonType> = ({ | ||
isRecording, | ||
handleStartRecording, | ||
handleStopRecording, | ||
}) => { | ||
return ( | ||
<div | ||
css={css` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.75rem; | ||
`} | ||
onClick={isRecording ? handleStopRecording : handleStartRecording} | ||
> | ||
{isRecording ? ( | ||
<Icon id="record-stop" width="2rem" height="2rem" /> | ||
) : ( | ||
<Icon id="record-start" width="2rem" height="2rem" /> | ||
)} | ||
<Typography variant={'body1'} color={theme.colors.text.white}> | ||
{isRecording ? '녹화종료' : '녹화시작'} | ||
</Typography> | ||
</div> | ||
); | ||
}; | ||
export default RecordControlButton; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[p-4] 구두로 논의한 내용 메모
위와 같은 형식의 아이콘+라벨 형태의 버튼이 다수 존재합니다.
따라서 이를 한번에 관리할 수 있는 foundation 컴포넌트가 있다면 더 깔끔해질 것 같습니다.
이 부분도 나중에 리펙터링 단계에서 적용할 내용이라 메모용으로 남겨놓겠습니다!