-
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.
[Feature] 레포지토리 입력할 때 모달 플로우 추가 (#46)
* feat: 신청 모달, 취소 모달 * feat: 컴포넌트 로직 분리 * chore: 문구 수정 * chore: 헤더 제거 * chore: fetcher 주석 해제 * feat: 레포지토리 입력 모달 * feat: 헤더 제거 * feat: match되는 studyHistoryId 찾는 훅 추가 * chore: modal 라우팅 경로 수정 * chore: my-study/my-assignment 로 이동 * chore: 이전 브랜치에 남은 로직 삭제 * feat: modal 라우팅 수정, url 쿼리paramter 넘기는 것으로 수정 * feat: 분기문 수정 * chore: 컴포넌트명 수정 * refactor: AssignmentBoxButtons 리팩토링 * feat: AssignmentBoxInfo 로 수정 * refactor: RepositorySubmissionBox 리팩토링 * feat: customRevalidate 삭제 * chore: 스타일 객체 하단으로 분리, 문구 수정 * feat: 추가된 히스토리 api dto 반영, 과제 없을 때 ui 추가 * feat: 입력할 때 빈 문자에 대한 validate 추가, 컴포넌트 하단 분리 * chore: 프로퍼티 스프레드로 * feat: 모달 url 변경 * feat: 에러 상태 핸들링 수정, 텍스트필드 height 고정 * chore: ui css반영 * feat: 모달 플로우 수정, 입력하기 버튼 누르면 모달 열리게
- Loading branch information
Showing
26 changed files
with
495 additions
and
279 deletions.
There are no files selected for viewing
122 changes: 0 additions & 122 deletions
122
...my-assignment/_components/AssignmentContent/AssignmentOverviewBox/AssignmenBoxButtons.tsx
This file was deleted.
Oops, something went wrong.
125 changes: 0 additions & 125 deletions
125
.../app/(afterLogin)/my-assignment/_components/AssignmentContent/RepositorySubmissionBox.tsx
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
...nt/app/(afterLogin)/my-study/my-assignment/@modal/(.)repository-url/confirmation/page.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,46 @@ | ||
"use client"; | ||
|
||
import { css } from "@styled-system/css"; | ||
import { Flex } from "@styled-system/jsx"; | ||
import { Modal, Space, Text } from "@wow-class/ui"; | ||
import { tags } from "constants/tags"; | ||
import useMatchedStudyHistoryId from "hooks/useMatchedStudyHistoryId"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { revalidateTagByName } from "utils/revalidateTagByName"; | ||
import Button from "wowds-ui/Button"; | ||
|
||
const RepositoryUrlConfirmationModal = () => { | ||
const searchParams = useSearchParams(); | ||
const url = searchParams.get("repositoryUrl"); | ||
//const studyHistoryId = useMatchedStudyHistoryId(); | ||
|
||
const handleClickSubmitButton = async () => { | ||
//await studyHistoryApi.putRepository(studyHistoryId, url); | ||
//TODO: 제출 후에 RepositoryBox 를 SUBMITTED 로 상태로 바꿔줘야함. | ||
revalidateTagByName(tags.studyDetailDashboard); | ||
}; | ||
return ( | ||
<Modal> | ||
<Flex alignItems="center" direction="column" width="21rem"> | ||
<Text typo="h1">레포지토리를 입력하시겠어요?</Text> | ||
<Space height={12} /> | ||
<Text color="sub">최초 과제 제출 전까지 수정이 가능해요.</Text> | ||
<Space height={8} /> | ||
<div className={urlBoxStyle}>{url}</div> | ||
<Space height={28} /> | ||
<Button onClick={handleClickSubmitButton}>입력하기</Button> | ||
</Flex> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default RepositoryUrlConfirmationModal; | ||
|
||
const urlBoxStyle = css({ | ||
backgroundColor: "backgroundAlternative", | ||
borderRadius: "5px", | ||
color: "sub", | ||
paddingX: "lg", | ||
paddingY: "md", | ||
textStyle: "h2", | ||
}); |
5 changes: 5 additions & 0 deletions
5
apps/client/app/(afterLogin)/my-study/my-assignment/@modal/(.)repository-url/default.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,5 @@ | ||
const Default = () => { | ||
return null; | ||
}; | ||
|
||
export default Default; |
5 changes: 5 additions & 0 deletions
5
apps/client/app/(afterLogin)/my-study/my-assignment/@modal/default.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,5 @@ | ||
const Default = () => { | ||
return null; | ||
}; | ||
|
||
export default Default; |
Oops, something went wrong.