diff --git a/src/feature/album/detail/components/PhotoList.tsx b/src/feature/album/detail/components/PhotoList.tsx index 571076d..882abc2 100644 --- a/src/feature/album/detail/components/PhotoList.tsx +++ b/src/feature/album/detail/components/PhotoList.tsx @@ -4,6 +4,7 @@ import PhotoBox from '@/global/components/photo/PhotoBox'; import Toast from '@/global/components/toast/Toast'; import { buildQuery } from '@/global/utils/buildQuery'; import { useAlbumSortStore } from '@/store/useAlbumSortStore'; +import { useAlbumTypeStore } from '@/store/useAlbumTypeStore'; import { useSelectedPhotosStore } from '@/store/useSelectedPhotosStore'; import { type FetchNextPageOptions, @@ -64,6 +65,12 @@ export default function PhotoList({ setSortType: state.setSortType, })), ); + const { albumType, setAlbumType } = useAlbumTypeStore( + useShallow((state) => ({ + albumType: state.albumType, + setAlbumType: state.setAlbumType, + })), + ); useEffect(() => { if (!hasNextPage) return; @@ -136,7 +143,7 @@ export default function PhotoList({
- 총 {totalPhotoCount || 0}장 + 총 {(albumType === 'all' ? totalPhotoCount : photos.length) || 0}장 {mode === 'default' && (