-
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.
- Loading branch information
Showing
9 changed files
with
112 additions
and
17 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
48 changes: 48 additions & 0 deletions
48
apps/client/app/(afterLogin)/my-study/my-assignment/@modal/(.)submit-modal/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,48 @@ | ||
"use client"; | ||
|
||
import { css } from "@styled-system/css"; | ||
import { Flex } from "@styled-system/jsx"; | ||
import { Modal, Space, Text } from "@wow-class/ui"; | ||
import { useModalRoute } from "@wow-class/ui/hooks"; | ||
import { useSearchParams } from "next/navigation"; | ||
import Button from "wowds-ui/Button"; | ||
|
||
const SubmitModal = () => { | ||
const searchParams = useSearchParams(); | ||
const { closeModal } = useModalRoute(); | ||
|
||
const url = searchParams.get("url"); | ||
|
||
const handleClickSubmitButton = () => { | ||
//TODO: studyHistoryId 넣어주기 | ||
//await studyHistoryApi.putRepository(1, url); | ||
|
||
//TODO: 제출 후에 RepositoryBox 를 SUBMITTED 로 상태로 바꿔줘야함. | ||
//customRevalidateTags(tags.studyDetailDashboard) | ||
closeModal(); | ||
}; | ||
return ( | ||
<Modal onClose={closeModal}> | ||
<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 SubmitModal; | ||
|
||
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/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; |
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
5 changes: 5 additions & 0 deletions
5
apps/client/app/(afterLogin)/my-study/my-assignment/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; |
18 changes: 18 additions & 0 deletions
18
apps/client/app/(afterLogin)/my-study/my-assignment/layout.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,18 @@ | ||
const Layout = ({ | ||
children, | ||
modal, | ||
}: { | ||
children: React.ReactNode; | ||
modal: React.ReactNode; | ||
}) => { | ||
return ( | ||
<> | ||
<main> | ||
{children} | ||
{modal} | ||
</main> | ||
</> | ||
); | ||
}; | ||
|
||
export default Layout; |
8 changes: 8 additions & 0 deletions
8
apps/client/app/(afterLogin)/my-study/my-assignment/submit-modal/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,8 @@ | ||
import { routePath } from "constants/routePath"; | ||
import { redirect } from "next/navigation"; | ||
|
||
const SubmitConfirmModalPage = () => { | ||
return redirect(routePath["my-assignment"]); | ||
}; | ||
|
||
export default SubmitConfirmModalPage; |
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