-
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.
* refactor: 게더링 디테일 헤더 게시글 작성자 정보로 수정 * refactor: 게더링 연락 버튼 유저네임 연결 * refactor: 게더링 카드 수정 * refactor: 포트폴리오 카드 링크 추가 부분 추가 * reafactor: 포트폴리오 유저페이지 연결 * feat: 포트폴리오 좋아요 * [Fix] 무한 스크롤 수정 (#107) * fix: useCumtomInfiniteQuery 수정 * feat: 실시간 알림 기능 추가 * docs: README 작성 * feat: 포폴 좋아요한 리스트 훅 * feat: 메인 게더링 그리드 구현 * feat: 게더링 좋아요 리스트 * reafactor: console.log 지우기 * refactor: main.tsx mock 코드 삭제 * refactor: 팔레트 철자 변경 * refactor: alert 정리 * refactor: 태크 키씹힘 수정 * refactor: 게더링 좋아요 수정 * fix: 배포오류 수정 * fix: 배포 오류 수정 --------- Co-authored-by: Cho-heejung <[email protected]>
- Loading branch information
Showing
54 changed files
with
697 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "palettee", | ||
"name": "palette", | ||
"private": true, | ||
"version": "1.0.1", | ||
"type": "module", | ||
|
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,11 +1,12 @@ | ||
export * from './lib/hooks'; | ||
export * from './model/index'; | ||
export * from './model/options'; | ||
export * from './model/types'; | ||
export * from './ui/GatheringCard'; | ||
export { GatheringDatePicker } from './ui/GatheringDatePicker'; | ||
export * from './ui/GatheringDetail/index'; | ||
export { GatheringLinkInput } from './ui/GatheringLinkInput'; | ||
export { GatheringMarkdownEditor } from './ui/GatheringMarkdownEditor'; | ||
export { GatheringSelect } from './ui/GatheringSelect'; | ||
export { GatheringTagInput } from './ui/GatheringTagInput'; | ||
export { GatheringTitleInput } from './ui/GatheringTitIeInput'; | ||
export * from './lib/hooks'; | ||
export * from './model/index'; |
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,51 @@ | ||
import { useInfiniteQuery } from '@tanstack/react-query'; | ||
|
||
import { gatheringApi } from '../../api/gathering.api'; | ||
import type { GatheringPageResponse, GatheringItem } from '../../model/dto/gathering.dto'; | ||
|
||
interface UseGatheringLikeListProps { | ||
size?: number; | ||
} | ||
|
||
interface GatheringLikeListParams { | ||
size: number; | ||
likeId: number; | ||
} | ||
|
||
export const useGatheringLikeList = ({ size = 10 }: UseGatheringLikeListProps = {}) => { | ||
const query = useInfiniteQuery<GatheringPageResponse>({ | ||
queryKey: ['infiniteLikeGatherings'], | ||
queryFn: async ({ pageParam }) => { | ||
const params: GatheringLikeListParams = { | ||
size, | ||
likeId: pageParam as number, | ||
}; | ||
|
||
return gatheringApi.getGatheringLikeList(params); | ||
}, | ||
getNextPageParam: lastPage => { | ||
if (!lastPage?.data?.hasNext) return undefined; | ||
return lastPage?.data.nextId ?? undefined; | ||
}, | ||
initialPageParam: undefined, | ||
}); | ||
|
||
const gatherings = | ||
query.data?.pages?.reduce<GatheringItem[]>((acc, page) => { | ||
const content = page.data?.content || []; | ||
|
||
const newGatherings = content.filter( | ||
newGathering => | ||
!acc.some( | ||
existingGathering => existingGathering.gatheringId === newGathering.gatheringId, | ||
), | ||
); | ||
|
||
return [...acc, ...newGatherings]; | ||
}, []) ?? []; | ||
|
||
return { | ||
...query, | ||
gatherings, | ||
}; | ||
}; |
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 { useQuery } from '@tanstack/react-query'; | ||
|
||
import { mainGatheringApi } from '../../api/gathering.api'; | ||
|
||
export const useMainGathering = () => { | ||
const query = useQuery({ | ||
queryKey: ['mainGatheringList'], | ||
queryFn: async () => { | ||
const response = await mainGatheringApi.getMainGatherings(); | ||
return response; | ||
}, | ||
}); | ||
|
||
// items 배열 추출 | ||
const items = query.data?.data.content ?? []; | ||
|
||
return { | ||
...query, | ||
items, | ||
}; | ||
}; |
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
Oops, something went wrong.
743b113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Lighthouse report for http://localhost:3000/
Detailed Metrics