메인 페이지 기본 틀: 헤더·콘텐츠 카드·푸터 + DB 상태 표시

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
이 커밋은 다음에 포함됨:
kjs
2026-08-12 17:25:33 +09:00
co-authored by Claude Fable 5
부모 03473faff0
커밋 c712a8b6e2
2개의 변경된 파일과 81개의 추가작업 그리고 12개의 파일을 삭제
+33
파일 보기
@@ -0,0 +1,33 @@
"use client";
import { useEffect, useState } from "react";
type Health = {
status: string;
db: { connected: boolean; now?: string; version?: string };
};
export default function DbStatus() {
const [health, setHealth] = useState<Health | null>(null);
const [error, setError] = useState(false);
useEffect(() => {
fetch("/api/health")
.then((res) => res.json())
.then(setHealth)
.catch(() => setError(true));
}, []);
if (error)
return <span className="text-sm text-red-500">● API 응답 없음</span>;
if (!health)
return <span className="text-sm text-gray-400">● 확인 중…</span>;
return health.db.connected ? (
<span className="text-sm text-green-600 dark:text-green-400">
● DB 연결됨 (PostgreSQL)
</span>
) : (
<span className="text-sm text-red-500">● DB 연결 안 됨</span>
);
}