Skip to content

Commit b270b9e

Browse files
committed
feat: show msg qhen no todo is there
1 parent 26d702f commit b270b9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/TodosContents.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const TodosContainer = () => {
1515
}, [])
1616

1717
const renderTodos = () => {
18+
19+
if (todos.length <= 0) {
20+
return <p className="text-center text-grayish-text my-10">Nothing to do for now.</p>
21+
}
22+
1823
return todos.map(todo => {
1924
return (
2025
<ListItem

0 commit comments

Comments
 (0)