refactor: UniversalListPage externalIsLoading 지원 및 스켈레톤 개선

- UniversalListPage에 externalIsLoading prop 추가
- CardTransactionDetailClient DevFill 자동입력 기능 추가
- 여러 컴포넌트 로딩 상태 처리 개선
- skeleton 컴포넌트 확장

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-01-22 20:54:16 +09:00
parent 207520e1d6
commit 19237be4aa
71 changed files with 244 additions and 155 deletions

View File

@@ -13,7 +13,6 @@ import { useState, useMemo, useCallback, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { format } from 'date-fns';
import { FileText, Plus, Pencil, Trash2 } from 'lucide-react';
import { ContentLoadingSpinner } from '@/components/ui/loading-spinner';
import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
import { TableRow, TableCell } from '@/components/ui/table';
@@ -399,11 +398,6 @@ export function BoardList() {
]
);
// ===== 로딩 상태 =====
if (isLoading && posts.length === 0 && boards.length === 0) {
return <ContentLoadingSpinner text="게시글을 불러오는 중..." />;
}
return (
<UniversalListPage<Post>
config={boardListConfig}
@@ -420,6 +414,7 @@ export function BoardList() {
}}
onTabChange={handleTabChange}
onSearchChange={setSearchQuery}
externalIsLoading={isLoading}
/>
);
}

View File

@@ -15,7 +15,7 @@ import { BoardForm } from './BoardForm';
import { getBoardById, createBoard, updateBoard, deleteBoard } from './actions';
import { forceRefreshMenus } from '@/lib/utils/menuRefresh';
import type { Board, BoardFormData } from './types';
import { ContentLoadingSpinner } from '@/components/ui/loading-spinner';
import { DetailPageSkeleton } from '@/components/ui/skeleton';
import { ErrorCard } from '@/components/ui/error-card';
import { Button } from '@/components/ui/button';
import { DeleteConfirmDialog } from '@/components/ui/confirm-dialog';
@@ -197,7 +197,7 @@ export function BoardDetailClientV2({ boardId, initialMode }: BoardDetailClientV
// 로딩 중
if (isLoading) {
return <ContentLoadingSpinner text="게시판 정보를 불러오는 중..." />;
return <DetailPageSkeleton sections={1} fieldsPerSection={6} />;
}
// 에러 발생 (view/edit 모드에서)