Skip to content

Commit

Permalink
chore: suspense 범위 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Nov 26, 2024
1 parent 684abd3 commit 9b5d3d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
10 changes: 3 additions & 7 deletions app/profile/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
'use client';

import NotFound from '@/app/not-found';
import {
BackButton,
GlobalNavigationBar,
HeaderBar,
} from '@/components/molecules';
import { GlobalNavigationBar, HeaderBar } from '@/components/molecules';
import { ProfileContainerSkeleton, useProfileData } from '@/features/profile';
import {
MyPageHeader,
Expand Down Expand Up @@ -34,9 +30,9 @@ export default function Profile({ params }: Mypage) {
return (
<article className={containerStyle}>
<HeaderBar>
<HeaderBar.LeftContent>
{/* <HeaderBar.LeftContent>
<BackButton />
</HeaderBar.LeftContent>
</HeaderBar.LeftContent> */}
</HeaderBar>
<ProfileContainerSkeleton />
<GlobalNavigationBar />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { RecommendedProfileCardListSkeleton } from '@/features/profile-recommend';
import { css } from '@/styled-system/css';
import { flex } from '@/styled-system/patterns';

Expand Down Expand Up @@ -25,6 +26,7 @@ export function ProfileContainerSkeleton() {
</div>
<div className={followerFollowingButton} />
</div>
<RecommendedProfileCardListSkeleton />
<div className={tabContainserStyles}>
<div className={tabItemStyles}>
<div className={tabStyles} />
Expand Down
13 changes: 3 additions & 10 deletions features/profile/components/organisms/my-page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
'use client';

import Link from 'next/link';
import { lazy, Suspense, useState } from 'react';
import { useState } from 'react';

import { Button } from '@/components/atoms';
import { StatisticsIcon } from '@/components/atoms';
import BadgeIcon from '@/components/atoms/icons/badge-icon';
import { Tab, TabItem } from '@/components/molecules';
const LazyRecommendedProfileCardList = lazy(() =>
import('@/features/profile-recommend').then((module) => ({
default: module.RecommendedProfileCardList,
})),
);
import { RecommendedProfileCardListSkeleton } from '@/features/profile-recommend';
import { RecommendedProfileCardList } from '@/features/profile-recommend';
import { useToast } from '@/hooks';
import { css } from '@/styled-system/css';
import { flex } from '@/styled-system/patterns';
Expand Down Expand Up @@ -66,9 +61,7 @@ export function MyProfile({
/>
</div>
</section>
<Suspense fallback={<RecommendedProfileCardListSkeleton />}>
<LazyRecommendedProfileCardList title="다른 수영인과 응원을 주고 받아보세요" />
</Suspense>
<RecommendedProfileCardList title="다른 수영인과 응원을 주고 받아보세요" />
<Tab type="primary">
<TabItem
text="통계"
Expand Down

0 comments on commit 9b5d3d4

Please sign in to comment.