diff --git a/src/components/HistorySummary/HistorySummary.animation.tsx b/src/components/HistorySummary/HistorySummary.animation.tsx index 3986be1..8a7b7d0 100644 --- a/src/components/HistorySummary/HistorySummary.animation.tsx +++ b/src/components/HistorySummary/HistorySummary.animation.tsx @@ -26,4 +26,15 @@ const HistorySummaryAnimation = ({ ); }; +export const HistorySummaryListAnimation = ({ + children, + className, +}: PropsWithChildren) => { + return ( + + {children} + + ); +}; + export default HistorySummaryAnimation; diff --git a/src/components/HistorySummary/HistorySummary.css.ts b/src/components/HistorySummary/HistorySummary.css.ts index 6358f13..8acee21 100644 --- a/src/components/HistorySummary/HistorySummary.css.ts +++ b/src/components/HistorySummary/HistorySummary.css.ts @@ -4,7 +4,7 @@ import { ODSTextTokenVariables } from '@/const/fonts'; import { colorVariants } from '@/styles/common/color.css'; import { flexColumn } from '@/styles/common/flex.css'; import { fontVariants } from '@/styles/common/font.css'; -import { W100 } from '@/styles/common/layout.css'; +import { W100, positionRelative } from '@/styles/common/layout.css'; export const barWidthStyle = style({ width: 'calc(100% + 0.75rem)', @@ -63,6 +63,13 @@ export const swiperItemStyle = style({ }); export const listWrapStyle = style([ + positionRelative, + { + transition: 'all 0.3s ease-in-out', + }, +]); + +export const historyListWrapStyle = style([ flexColumn, { transition: 'all 0.3s ease-in-out', diff --git a/src/components/HistorySummary/HistorySummary.tsx b/src/components/HistorySummary/HistorySummary.tsx index 14cb3f4..3babb1e 100644 --- a/src/components/HistorySummary/HistorySummary.tsx +++ b/src/components/HistorySummary/HistorySummary.tsx @@ -1,12 +1,7 @@ 'use client'; import classNames from 'classnames'; -import React, { - Fragment, - PropsWithChildren, - useContext, - useState, -} from 'react'; +import React, { Fragment, PropsWithChildren, useState } from 'react'; import HistoryCard from '@/components/Card/History/HistoryCard'; import { HistoryCardContextProps } from '@/components/Card/History/HistoryCard.context'; import { @@ -18,7 +13,7 @@ import CommonIcon from '@/composable/Icon/CommonIcon'; import Pagination from '@/composable/Pagination/Pagination'; import Spacer from '@/composable/Spacer/Spacer'; import { useODSBreakPoints } from '@/hook/useODSBreakPoints'; -import { W100, positionRelative } from '@/styles/common/layout.css'; +import { W100 } from '@/styles/common/layout.css'; import { getStaticContext } from '@/utils/context/StaticContext'; import OceanSwiper from '../OceanSwiper/OceanSwiper'; import HistorySummaryAnimation from './HistorySummary.animation'; @@ -38,6 +33,7 @@ import { swiperWrapStyleVariants, listWrapGradientStyle, oceanSwiperWrapperStyle, + historyListWrapStyle, } from './HistorySummary.css'; export interface HistoryCardData extends HistoryCardContextProps { id: string; @@ -76,13 +72,12 @@ const List = ({ children }: PropsWithChildren) => { const [isOpen, setIsOpen] = useState(isDetailView || false); const displayData = !isOpen ? data.slice(0, 2) : data; return ( -
+
2 && !isOpen && listWrapGradientStyle, )} - suppressHydrationWarning >

{title}

{displayData.map((history, idx) => { diff --git a/src/components/Welcome/Welcome.animation.tsx b/src/components/Welcome/Welcome.animation.tsx index 4766b57..cbbb538 100644 --- a/src/components/Welcome/Welcome.animation.tsx +++ b/src/components/Welcome/Welcome.animation.tsx @@ -11,7 +11,7 @@ const WelcomeAnimation = ({ children }: PropsWithChildren) => { className={wrapTextStyle} initial={{ opacity: 0, y: 150 }} whileInView={{ opacity: 1, y: 0 }} - transition={{ duration: ODSAnimation.duration }} + transition={{ duration: ODSAnimation.duration, delay: 0.5 }} viewport={{ once: true }} > {children} diff --git a/src/composable/Mock/Mock.animation.tsx b/src/composable/Mock/Mock.animation.tsx index 4dacf18..6ce09e0 100644 --- a/src/composable/Mock/Mock.animation.tsx +++ b/src/composable/Mock/Mock.animation.tsx @@ -12,25 +12,13 @@ const MockAnimation = ({ className, device, }: PropsWithChildren) => { - // return ( - // - // {children} - // - // ); - if (device === 'mobile') return ( {children} diff --git a/src/containers/HistorySummaryContainer.tsx b/src/containers/HistorySummaryContainer.tsx index ded3b9d..0471409 100644 --- a/src/containers/HistorySummaryContainer.tsx +++ b/src/containers/HistorySummaryContainer.tsx @@ -1,20 +1,31 @@ 'use client'; import dynamic from 'next/dynamic'; -import { Suspense, useContext } from 'react'; +import { useContext } from 'react'; import { DispatcherContextHistory, StaticContextHistory, ValueContextHistory, } from '@/components/History/History.context'; import HistorySummary from '@/components/HistorySummary/HistorySummary'; -import StandaloneSkeleton from '@/components/StandaloneSkeleton/StandaloneSkeleton'; +import Skeleton from '@/composable/Skeleton/Skeleton'; import { getStaticContext } from '@/utils/context/StaticContext'; const HistoryCarouselContainer = dynamic( () => import('@/containers/HistoryCarouselContainer'), { ssr: false, + loading: () => { + return ( + + ); + }, }, ); @@ -77,12 +88,10 @@ const HistorySummaryContainer = ({ isMobile }: SummaryContainerProps) => { > {isMobile && ( - }> - {isSelected && - historySummary.id === state[menuPage].summary_id && ( - - )} - + {isSelected && + historySummary.id === state[menuPage].summary_id && ( + + )} )}