Skip to content
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
41 changes: 41 additions & 0 deletions src/components/skeletons/MyAllPinsCardSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Skeleton } from '@/components/ui/Skeleton';

export function MyAllPinsCardSkeleton() {
return (
<article
className="flex w-full flex-col rounded-[20px] bg-pli-black-85 px-4 pt-4 pb-3"
aria-hidden
>
<div className="flex items-center gap-1">
<div className="flex min-w-0 flex-1 items-center gap-1.5">
<Skeleton className="size-5 shrink-0 rounded-sm" />
<Skeleton className="h-6 w-[226px] rounded-sm" />
<Skeleton className="size-6 shrink-0 rounded-sm" />
</div>
<Skeleton className="size-6 shrink-0 rounded-sm" />
</div>

<div className="flex items-center gap-[17px] pt-[13px]">
<Skeleton className="size-[59px] shrink-0 rounded-lg" />
<div className="flex min-w-0 flex-col gap-1">
<Skeleton className="h-6 w-[133px] max-w-full rounded-sm" />
<Skeleton className="h-[21px] w-[117px] max-w-full rounded-sm" />
</div>
</div>

<div className="flex w-full flex-col gap-0.5 pt-[13px]">
<Skeleton className="h-[21px] w-full rounded-sm" />
<Skeleton className="h-[21px] w-full rounded-sm" />
<Skeleton className="h-[21px] w-full rounded-sm" />
</div>

<div className="flex items-center gap-2 pt-1">
<Skeleton className="h-[29px] w-9 rounded-lg" />
<Skeleton className="h-[29px] w-9 rounded-lg" />
</div>

<div className="mt-1 border-b border-pli-black-75" />
<Skeleton className="mt-2 h-[21px] w-[26px] self-end rounded-sm" />
</article>
);
}
5 changes: 3 additions & 2 deletions src/pages/MyPlimapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';

import { TopBar } from '@/components/ui/TopBar';
import { Toast, ToastProvider, ToastViewport } from '@/components/ui/Toast';
import { MyAllPinsCardSkeleton } from '@/components/skeletons/MyAllPinsCardSkeleton';
import { PinCardSkeleton } from '@/components/skeletons/PinCardSkeleton';
import { MyAllPinsCard } from '@/features/profile/components/MyAllPinsCard';
import { MyPlimapTabs } from '@/features/profile/components/MyPlimapTabs';
Expand Down Expand Up @@ -84,8 +85,8 @@ export default function MyPlimapPage() {
<span className="sr-only" role="status">
내 핀을 불러오는 중
</span>
{Array.from({ length: 4 }, (_, index) => (
<PinCardSkeleton key={index} />
{Array.from({ length: 3 }, (_, index) => (
<MyAllPinsCardSkeleton key={index} />
))}
</>
) : isMyPinsError ? (
Expand Down
6 changes: 3 additions & 3 deletions src/pages/SongListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export default function SongListPage() {
const isSearchPending =
hasSearchQuery && (trackSearchQuery.isDebouncing || trackSearchQuery.isPending);
const tracks =
hasSearchQuery && !trackSearchQuery.isDebouncing
? (trackSearchQuery.data?.tracks ?? [])
: [];
hasSearchQuery && !trackSearchQuery.isDebouncing ? (trackSearchQuery.data?.tracks ?? []) : [];

useEffect(() => {
if (!trackSearchQuery.isError) return;
Expand Down Expand Up @@ -88,6 +86,8 @@ export default function SongListPage() {
다시 시도
</button>
</div>
) : hasSearchQuery && tracks.length === 0 ? (
<p className="py-10 text-center body-17-r text-grayscale-500">검색 결과가 없어요</p>
) : (
<ul>
{tracks.map((track) => (
Expand Down
Loading