Skip to content

Commit 5ff33cd

Browse files
committed
feat: 빈 배열 상태 UI 구현
1 parent 51447d1 commit 5ff33cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/component/TodoList.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import TodoCard from "./TodoCard";
2+
import TodoEmpty from "./TodoEmpty";
23

34
export default function TodoList() {
45

@@ -9,6 +10,10 @@ export default function TodoList() {
910
{ id: 4, content: "프로젝트 회의 준비" },
1011
];
1112

13+
if (todos.length === 0) {
14+
return <TodoEmpty />;
15+
}
16+
1217
return (
1318
<ul className="flex flex-col items-start gap-4 self-stretch">
1419
{todos.map((todo) => (

0 commit comments

Comments
 (0)