-
Notifications
You must be signed in to change notification settings - Fork 0
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 #51 from teamViNO/feature-046
feature-046: 카테고리 페이지에 있는 sub menu에서 이동하는 로직 추가
- Loading branch information
Showing
27 changed files
with
832 additions
and
472 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import axiosInstance from './config/instance'; | ||
|
||
// 모든 카테고리 가져오는 API | ||
export const getCategories = async () => { | ||
const response = await axiosInstance.get('/category'); | ||
return response.data.result; | ||
}; | ||
|
||
// 카테고리 이동1 API | ||
export const putSubToOtherTop = async ( | ||
categoryId: number, | ||
topCategoryId: number, | ||
) => { | ||
const response = await axiosInstance.put( | ||
`/category/${categoryId}/${topCategoryId}`, | ||
); | ||
return response.data.result; | ||
}; | ||
|
||
// 카테고리 이동2 API | ||
export const putSubToTop = async (categoryId: number) => { | ||
const response = await axiosInstance.put(`/category/up/${categoryId}`); | ||
return response.data.result; | ||
}; | ||
|
||
// 카테고리 이동3 API | ||
export const putTopToOtherTop = async ( | ||
categoryId: number, | ||
topCategoryId: number, | ||
) => { | ||
const response = await axiosInstance.put( | ||
`/category/down/${categoryId}/${topCategoryId}`, | ||
); | ||
return response.data.result; | ||
}; | ||
|
||
// 상위 카테고리 추가 API | ||
export const postTopCategroy = async () => { | ||
const response = await axiosInstance.post('/category'); | ||
return response.data.result; | ||
}; | ||
|
||
// 상위 카테고리 추가 API | ||
export const postSubCategroy = async (topCategoryId: number) => { | ||
const response = await axiosInstance.post(`/category/${topCategoryId}`); | ||
return response.data.result; | ||
}; |
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,21 @@ | ||
import EmptyFile from '@/assets/empty-file.png'; | ||
import * as EmptyCardStyles from '@/styles/category/EmptyCard.style'; | ||
|
||
const EmptyCard = () => { | ||
return ( | ||
<EmptyCardStyles.Container> | ||
<img src={EmptyFile} alt="비어있는 폴더" /> | ||
<EmptyCardStyles.ContentWrap> | ||
<EmptyCardStyles.Content> | ||
아직 관련 영상이 없어요! | ||
</EmptyCardStyles.Content> | ||
<EmptyCardStyles.Content> | ||
관련 영상들을 모아보세요 | ||
</EmptyCardStyles.Content> | ||
</EmptyCardStyles.ContentWrap> | ||
<EmptyCardStyles.Button>영상 정리해보기</EmptyCardStyles.Button> | ||
</EmptyCardStyles.Container> | ||
); | ||
}; | ||
|
||
export default EmptyCard; |
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.