Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: 콜렉션 리스트 무한스크롤 기능 구현 및 일부 로직 수정 #268

Merged
merged 13 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/app/collection/[folderId]/_components/HeaderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ import useBooleanOutput from '@/hooks/useBooleanOutput';
interface HeaderContainerProps {
handleSetOnBottomSheet: () => void;
handleSetOnDeleteOption: () => void;
isHideOption: boolean;
}

export default function HeaderContainer({ handleSetOnBottomSheet, handleSetOnDeleteOption }: HeaderContainerProps) {
export default function HeaderContainer({
handleSetOnBottomSheet,
handleSetOnDeleteOption,
isHideOption,
}: HeaderContainerProps) {
const { isOn, handleSetOn, handleSetOff } = useBooleanOutput();

const bottomSheetOptionList = [
Expand All @@ -35,7 +40,7 @@ export default function HeaderContainer({ handleSetOnBottomSheet, handleSetOnDel

return (
<>
<Header title="콜렉션" left="back" right={<RightButton />} leftClick={() => history.back()} />
<Header title="콜렉션" left="back" right={!isHideOption && <RightButton />} leftClick={() => history.back()} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParkSohyunee 콜렉션 '전체'가 생긴 후 기획안을 세워두지 않았는데, 세심한 부분까지 챙겨주셔서 진심으로 감사드립니다🙇‍♀️

{isOn && <BottomSheet onClose={handleSetOff} optionList={bottomSheetOptionList} isActive />}
</>
);
Expand Down
6 changes: 5 additions & 1 deletion src/app/collection/[folderId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ export default function CollectionDetailPage({ params }: ParamType) {

return (
<section className={styles.container}>
<HeaderContainer handleSetOnBottomSheet={handleSetOn} handleSetOnDeleteOption={handleSetOnDeleteOption} />
<HeaderContainer
handleSetOnBottomSheet={handleSetOn}
handleSetOnDeleteOption={handleSetOnDeleteOption}
isHideOption={params.folderId === '0'}
/>
<Collections folderId={folderId} />
<BottomSheet isOn={isOn}>
<BottomSheet.Title>폴더 이름 바꾸기</BottomSheet.Title>
Expand Down