refactor(WEB): 공통 훅(useDeleteDialog, useStatsLoader) 및 CRUD 서비스 추출

- useDeleteDialog 훅 추출로 삭제 다이얼로그 로직 공통화
- useStatsLoader 훅 추출로 통계 로딩 패턴 공통화
- create-crud-service 유틸 추가
- 차량관리/견적/출고/검사 등 리스트 컴포넌트 간소화
- RankManagement actions 정리
- 프로덕션 로거 불필요 출력 제거

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-09 20:42:05 +09:00
parent 3ea6a57a10
commit 4d79b178e3
22 changed files with 588 additions and 619 deletions

View File

@@ -10,7 +10,7 @@
* - 삭제 클릭 시 "정말 삭제하시겠습니까?" 확인 Alert
*/
import { useState, useCallback } from 'react';
import { useState, useCallback, memo } from 'react';
import { format } from 'date-fns';
import { User, Pencil, Trash2 } from 'lucide-react';
import { Button } from '@/components/ui/button';
@@ -25,7 +25,7 @@ interface CommentItemProps {
onDelete: (id: string) => void;
}
export function CommentItem({
export const CommentItem = memo(function CommentItem({
comment,
currentUserId,
onUpdate,
@@ -156,6 +156,6 @@ export function CommentItem({
/>
</div>
);
}
});
export default CommentItem;