From ea7b21dee35b9a5b5261e747543a6b5f94d6cb09 Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Thu, 4 Jun 2026 09:45:26 +0900 Subject: [PATCH] =?UTF-8?q?fix(dev):=20/dev/clinics=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=A0=9C=EA=B1=B0=20=E2=80=94=20list=20=EC=97=94?= =?UTF-8?q?=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=82=AC=EB=9D=BC?= =?UTF-8?q?=EC=A0=B8=20=EB=B9=8C=EB=93=9C=20=EA=B9=A8=EC=A7=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- src/features/dev/pages/ClinicsPage.tsx | 159 ------------------------- src/features/dev/routes.tsx | 2 - 2 files changed, 161 deletions(-) delete mode 100644 src/features/dev/pages/ClinicsPage.tsx diff --git a/src/features/dev/pages/ClinicsPage.tsx b/src/features/dev/pages/ClinicsPage.tsx deleted file mode 100644 index 2402118..0000000 --- a/src/features/dev/pages/ClinicsPage.tsx +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Dev: 클리닉 리스트 페이지. - * - * 백엔드 `GET /api/clinics` (getClinics) 응답을 표로 확인하는 개발용 화면. - * 운영 도메인 노출 방지는 라우트 단의 DevOnly 가드에 위임. - */ -import { useState } from 'react'; -import { Link } from 'react-router'; -import { useGetClinics } from '@/shared/api/generated/clinics/clinics'; -import { PageContainer } from '@/shared/ui/page-container'; -import { Spinner } from '@/shared/ui/spinner'; -import { EmptyState } from '@/shared/ui/empty-state'; -import { Button } from '@/shared/ui/button'; - -const PAGE_SIZE = 50; - -function formatDate(raw: string): string { - try { - return new Date(raw).toLocaleString('ko-KR', { - year: 'numeric', - month: '2-digit', - day: '2-digit', - hour: '2-digit', - minute: '2-digit', - }); - } catch { - return raw; - } -} - -export default function ClinicsPage() { - const [offset, setOffset] = useState(0); - - const { data, isLoading, error, refetch, isFetching } = useGetClinics( - { limit: PAGE_SIZE, offset }, - { query: { staleTime: 0 } }, - ); - - const items = data?.status === 200 ? data.data.items : []; - const total = data?.status === 200 ? data.data.total : 0; - - return ( -
- -
-
-

- Dev · Clinics -

-

- 클리닉 리스트 -

-

- GET /api/clinics · limit={PAGE_SIZE} · offset={offset} · total={total} -

-
-
- -
-
- - {isLoading ? ( -
- -
- ) : error ? ( -
- 클리닉 리스트 조회 실패: {String((error as Error)?.message ?? error)} -
- ) : items.length === 0 ? ( - - ) : ( -
- - - - - - - - - - - - - - {items.map((c) => ( - - - - - - - - - - ))} - -
병원명EN상태URL주소생성일hospital_id
- - {c.hospital_name} - - {c.hospital_name_en ?? '—'} - - {c.status} - - - {c.url ? ( - - {c.url} - - ) : ( - '—' - )} - {c.road_address ?? '—'}{formatDate(c.created_at)}{c.hospital_id}
-
- )} - -
- - {total > 0 ? `${offset + 1}-${Math.min(offset + items.length, total)} / ${total}` : ''} - - - -
-
-
- ); -} diff --git a/src/features/dev/routes.tsx b/src/features/dev/routes.tsx index 34ff8fe..7f5f3dc 100644 --- a/src/features/dev/routes.tsx +++ b/src/features/dev/routes.tsx @@ -2,7 +2,6 @@ import { lazy } from 'react' import DevOnly from './components/DevOnly' const ComponentsPage = lazy(() => import('./pages/ComponentsPage')) -const ClinicsPage = lazy(() => import('./pages/ClinicsPage')) const TestPrefillPage = lazy(() => import('./pages/TestPrefillPage')) // `/dev/*` 와 `/test` 는 DevOnly 가드를 거쳐 로컬호스트에서만 접근 가능. @@ -11,7 +10,6 @@ export const devRoutes = [ element: , children: [ { path: 'dev/components', element: }, - { path: 'dev/clinics', element: }, { path: 'test', element: }, ], },