-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feat: 짤 업로드 api 통합 구현 Feat: 전체 유저 인기 태그 api 통합 구현 Feat: 짤 업로드 완료 시 초기화 구현 Feat: react-tostify를 활용하여 상황별 Toast 구현 (사진파일, 제목, 태그 미등록 & HTTP 요청 실패 & 업로드 성공) Style: toast.success color를 primary color로 지정 Refactor: handleUploadZzal 함수에서 mutation 객체 직접 사용하여 성공/실패 콜백 처리 Refactor: RecommendTag 컴포넌트의 recommendTags props에 popularTagsName이 아닌 ppopularTags 전달 Refactor: if-else 구문을 early return 문으로 변경 Refactor: 파일이 없을 경우 바로 return Refactor: previewUrl을 atom이 아닌 useState 상태로 두고 props로 넘겨줘서 사용 Feat: 짤 제목 input 창 추가 및 등록 Style: 기본 및 반응형 UI 수정 Refactor: 불필요한 falsy값 체크 코드 제거 Refactor: 업로드할 미리보기 이미지 img태그를 사용하여 보여주도록 변경 및 style 변경 Refactor: 커스텀 api 훅의 요청 함수를 화살표 함수로 작성하는 규칙에 맞게 형식 변경
- Loading branch information
Showing
12 changed files
with
217 additions
and
53 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 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useQuery } from "@tanstack/react-query"; | ||
import { getPopularTags } from "@/apis/tag"; | ||
|
||
const useGetPopularTags = () => { | ||
const { data, ...rest } = useQuery({ | ||
queryKey: ["popularTags"], | ||
queryFn: () => getPopularTags(), | ||
}); | ||
|
||
return { | ||
popularTags: data || [], | ||
...rest, | ||
}; | ||
}; | ||
|
||
export default useGetPopularTags; |
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 @@ | ||
import { useMutation } from "@tanstack/react-query"; | ||
import { postUploadZzal } from "@/apis/zzal"; | ||
|
||
interface Props { | ||
file: File; | ||
tagIdList: Array<number>; | ||
title: string; | ||
} | ||
|
||
const usePostUploadZzal = () => { | ||
const { mutate, ...rest } = useMutation({ | ||
mutationFn: ({ file, tagIdList, title }: Props) => postUploadZzal({ file, tagIdList, title }), | ||
}); | ||
|
||
return { uploadZzal: mutate, ...rest }; | ||
}; | ||
|
||
export default usePostUploadZzal; |
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 |
---|---|---|
|
@@ -34,3 +34,7 @@ | |
clip: rect(0 0 0 0); | ||
clip-path: polygon(0 0, 0 0, 0 0); | ||
} | ||
|
||
:root { | ||
--toastify-color-success: #246fff; | ||
} |
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
Oops, something went wrong.