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
18 changes: 18 additions & 0 deletions app/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,24 @@ pre {
padding: 1rem 0;
}

.banner-offline {
background: #fef2f2;
border: 1px solid #fca5a5;
color: #991b1b;
border-radius: 8px;
padding: 0.75rem 1rem;
margin-bottom: 1rem;
font-weight: 500;
}

@media (prefers-color-scheme: dark) {
.banner-offline {
background: #450a0a;
border-color: #7f1d1d;
color: #fca5a5;
}
}

@media (max-width: 640px) {
main {
padding: 1rem 0.75rem 3rem;
Expand Down
10 changes: 10 additions & 0 deletions app/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ export default function HomePage() {
const sourceRef = useRef<HTMLTextAreaElement>(null);
const questionRef = useRef<HTMLTextAreaElement>(null);

const [apiOnline, setApiOnline] = useState(true);

useEffect(() => {
fetch(ENDPOINT.health)
.then((res) => setApiOnline(res.ok))
.catch(() => setApiOnline(false));
void refreshAll();
}, []);

Expand Down Expand Up @@ -166,6 +171,11 @@ export default function HomePage() {

return (
<main>
{!apiOnline && (
<p className="banner-offline" role="alert">
API 서버에 연결할 수 없습니다. 일부 기능이 제한됩니다.
</p>
)}
<h1 id="title">Knowledge Copilot</h1>
<p className="subtitle">RAG, 액션형 AI, API 로그 추적까지 포함한 포트폴리오 프로젝트</p>

Expand Down