Skip to content

Commit

Permalink
feat: 다음 페이지 로딩 시 ui 추가 및 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
Jungjjeong committed Aug 28, 2024
1 parent 8660484 commit b286d7d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/molecules/profile-list/profile-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ type ProfileList = {
data: MemberProfile[];
fetchNextData: () => void;
isLoading?: boolean;
isFetchingNextData?: boolean;
isFetchingNextPage?: boolean;
};
export const ProfileList = ({
data,
fetchNextData,
isLoading,
isFetchingNextData,
isFetchingNextPage,
}: ProfileList) => {
const handleRangeChanged = (range: { endIndex: number }) => {
const currentContentsLastIndex = data.length - 1;
Expand All @@ -43,7 +43,8 @@ export const ProfileList = ({
height: '100%',
}}
components={{
Footer: () => (isFetchingNextData ? <LoadingArea /> : <></>),
Footer: () =>
isFetchingNextPage ? <LoadingArea width={30} height={30} /> : <></>,
}}
/>
);
Expand Down
1 change: 1 addition & 0 deletions features/follow/sections/follower-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const FollowerSection = ({ id }: { id: number }) => {
data={flattenData}
fetchNextData={fetchNextData}
isLoading={isLoading}
isFetchingNextPage={isFetchingNextPage}
/>
);
};
1 change: 1 addition & 0 deletions features/follow/sections/following-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const FollowingSection = ({ id }: { id: number }) => {
data={flattenData}
fetchNextData={fetchNextData}
isLoading={isLoading}
isFetchingNextPage={isFetchingNextPage}
/>
);
};
1 change: 1 addition & 0 deletions features/profile-search/sections/search-result-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const SearchResultSection = ({ keyword }: { keyword: string }) => {
data={flattenData}
fetchNextData={fetchNextData}
isLoading={isLoading}
isFetchingNextPage={isFetchingNextPage}
/>
</div>
);
Expand Down

0 comments on commit b286d7d

Please sign in to comment.