-
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 #50 from YAPP-Github/refactor/convention-48
[ Refactor/convention 48 ] 쿼리 컨벤션 및 shared 폴더로 컴포넌트 이동
- Loading branch information
Showing
19 changed files
with
172 additions
and
162 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
This file was deleted.
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
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
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
export const PROBLEM_API_ROUTES = { | ||
problems: (articleId: number) => `/articles/${articleId}/problems`, | ||
submitAnswer: (problemId: number) => `/problems/${problemId}`, | ||
export const API_ROUTE = { | ||
PROBLEM: (articleId: number) => `/articles/${articleId}/problems`, | ||
SUBMIT_ANSWER: (problemId: number) => `/problems/${problemId}`, | ||
}; | ||
|
||
export const QUERY_KEY = { | ||
GET_PROBLEM: "get-problem-info", | ||
POST_PROBLEM_ANSWER: "post-problem-answer", | ||
}; |
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 was deleted.
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
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,44 @@ | ||
import React from "react"; | ||
|
||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogDescription, | ||
DialogFooter, | ||
DialogHeader, | ||
DialogTitle, | ||
} from "@shared/components/ui/dialog"; | ||
export interface ExternalControlOpenDialogProps { | ||
isOpen: boolean; | ||
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>; | ||
title: React.ReactNode; | ||
content: React.ReactNode; | ||
footer?: React.ReactNode; | ||
description?: string; | ||
} | ||
|
||
export default function ExternalControlOpenDialog({ | ||
isOpen, | ||
setIsOpen, | ||
title, | ||
content, | ||
footer, | ||
description, | ||
}: ExternalControlOpenDialogProps) { | ||
return ( | ||
<Dialog open={isOpen} onOpenChange={setIsOpen}> | ||
<DialogContent className="z-50 w-full max-w-[380px] rounded"> | ||
<DialogHeader> | ||
<DialogTitle>{title}</DialogTitle> | ||
{description && <DialogDescription>{description}</DialogDescription>} | ||
</DialogHeader> | ||
{content} | ||
{footer && ( | ||
<DialogFooter className="mt-[20px] sm:justify-start"> | ||
{footer} | ||
</DialogFooter> | ||
)} | ||
</DialogContent> | ||
</Dialog> | ||
); | ||
} |
Oops, something went wrong.