Skip to content

Commit 93b35fc

Browse files
committed
Feat: NoticePage에 로딩 상태 추가 및 오류 메시지 표시 기능 구현
1 parent f259365 commit 93b35fc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/notice/page.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default function NoticePage() {
99
const [category, setCategory] = useState('all');
1010
const [status, setStatus] = useState('all');
1111
const [selected, setSelected] = useState(null);
12+
const [loading, setLoading] = useState(false);
1213

1314
const filtered = useMemo(() => {
1415
return notices.filter((n) => {
@@ -18,6 +19,14 @@ export default function NoticePage() {
1819
});
1920
}, [category, status]);
2021

22+
if (!loading) {
23+
return (
24+
<div className="flex flex-col items-center justify-center min-h-[60vh] text-white">
25+
<h2 className="text-2xl font-bold mb-2">Error</h2>
26+
</div>
27+
);
28+
}
29+
2130
return (
2231
<div className="px-6 tablet:px-10 desktop:px-16 py-10">
2332
{/* Hero */}

0 commit comments

Comments
 (0)