Skip to content

Commit

Permalink
Merge pull request #482 from woowacourse-teams/feature/#465
Browse files Browse the repository at this point in the history
트립생성 페이지 스켈레톤 적용
  • Loading branch information
ashleysyheo authored Aug 17, 2023
2 parents 757ddbd + 0bba6e4 commit 7465cc0
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ export const shareUrlWrapperStyling = css({
export const shareUrlStyling = css({
padding: `${Theme.spacer.spacing1} ${Theme.spacer.spacing2}`,

overflow: 'hidden',
overflowX: 'scroll',
whiteSpace: 'nowrap',
'-ms-overflow-style': 'none',
scrollbarWidth: 'none',

'::-webkit-scrollbar': {
display: 'none',
},

color: Theme.color.black,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ export const formStyling = css({
},
},
});

export const skeletonStyling = css({
width: '100%',
height: '70px',
marginTop: Theme.spacer.spacing5,

'@media screen and (max-width: 600px)': {
marginTop: Theme.spacer.spacing4,
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Skeleton } from 'hang-log-design-system';

import { skeletonStyling } from '@components/trip/TripCreateForm/TripCreateForm.style';

const TripCreateFormSkeleton = () => {
return (
<>
<Skeleton css={skeletonStyling} />
<Skeleton css={skeletonStyling} />
<Skeleton css={skeletonStyling} />
</>
);
};

export default TripCreateFormSkeleton;
7 changes: 6 additions & 1 deletion frontend/src/pages/TripCreatePage/TripCreatePage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Suspense } from 'react';

import { useRecoilValue } from 'recoil';

import { Box, Flex, Heading } from 'hang-log-design-system';
Expand All @@ -9,6 +11,7 @@ import {
} from '@pages/TripCreatePage/TripCreatePage.style';

import TripCreateForm from '@components/trip/TripCreateForm/TripCreateForm';
import TripCreateFormSkeleton from '@components/trip/TripCreateForm/TripCreateFormSkeleton';

import { mediaQueryMobileState } from '@store/mediaQuery';

Expand All @@ -21,7 +24,9 @@ const TripCreatePage = () => {
<Flex css={containerStyling}>
<Box css={boxStyling}>
<Heading size={isMobile ? 'small' : 'medium'}>여행을 기록해 보세요</Heading>
<TripCreateForm />
<Suspense fallback={<TripCreateFormSkeleton />}>
<TripCreateForm />
</Suspense>
</Box>
<CreatePageImage aria-label="세계 랜드마크 이미지" css={backgroundImageStyling} />
</Flex>
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/router/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ const AppRouter = () => {
},
{
path: PATH.CREATE_TRIP,
element: (
<Suspense>
<TripCreatePage />
</Suspense>
),
element: <TripCreatePage />,
},
{
path: PATH.EXPENSE(':tripId'),
Expand Down

0 comments on commit 7465cc0

Please sign in to comment.