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

크루 랭킹 페에지, 알림 페이지 스켈레톤 UI 추가 #381

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from '@emotion/styled';

import { Flex } from '@components/shared/Flex';

export const PageContent = styled(Flex)`
padding: 10px 0 70px 0;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Header } from '@components/Header';
import { ManageContainer } from '@components/Participation';
import { Skeleton } from '@components/Skeleton';

import { theme } from '@styles/theme';

import { PageContent } from './ItemListPageSkeleton.styles';

type ItemListPageSkeletonProps = {
name: string;
};

export const ItemListPageSkeleton = ({ name }: ItemListPageSkeletonProps) => {
return (
<Skeleton
width="100%"
height="60px"
radius="5px"
defaultColor={theme.PALETTE.GRAY_200}
gradientColor={theme.PALETTE.GRAY_300}
>
<ManageContainer>
<Header title={name} />
<PageContent direction="column" gap={10}>
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
<Skeleton.Item />
</PageContent>
</ManageContainer>
</Skeleton>
);
};
1 change: 1 addition & 0 deletions src/pages/__components__/ItemListPageSkeleton/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ItemListPageSkeleton';
13 changes: 11 additions & 2 deletions src/routes/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Layout } from '@pages/Layout';
import { MainPageLoading } from '@pages/MainPage';
import { ProfilePageSkeleton } from '@pages/ProfilePage';
import { CardListPageSkeleton } from '@pages/__components__/CardListPageSkeleton';
import { ItemListPageSkeleton } from '@pages/__components__/ItemListPageSkeleton';
import { ManagePageSkeleton } from '@pages/__components__/ManagePageSkeleton';

import { LoginRequireBoundary } from './LoginRequireBoundary';
Expand Down Expand Up @@ -145,7 +146,11 @@ export const router = createBrowserRouter([
},
{
path: 'crews/ranking',
element: <CrewsRankingPage />,
element: (
<Suspense fallback={<ItemListPageSkeleton name="크루 랭킹" />}>
<CrewsRankingPage />
</Suspense>
),
},
{
path: 'crews/:id',
Expand Down Expand Up @@ -198,7 +203,11 @@ export const router = createBrowserRouter([
},
{
path: 'notification',
element: <NotificationPage />,
element: (
<Suspense fallback={<ItemListPageSkeleton name="알림" />}>
<NotificationPage />
</Suspense>
),
},
{
path: 'auth/kakao/callback',
Expand Down
Loading