File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { useFetchTodos } from "../Domain/UseCases/useFetchTodos" ;
2
- import { TodoDataSourceImpl } from "../Data/DataSources/TodoDataSource" ;
3
2
import { TodoRepositoryImpl } from "../Data/Repositories/TodoRepositoryImpl" ;
4
3
import { TodoLocalStorageDataSource } from "../Data/DataSources/Todo/TodoLocalStorageDataSource" ;
5
4
@@ -15,11 +14,17 @@ export function TodoList() {
15
14
{ isFetchTodosLoading ? (
16
15
< div > Loading...</ div >
17
16
) : (
18
- < ul >
19
- { todos ?. map ( ( todo ) => (
20
- < li key = { todo . id } > { todo . title } </ li >
21
- ) ) }
22
- </ ul >
17
+ < >
18
+ { todos . length === 0 ? (
19
+ < div > No available Todos.</ div >
20
+ ) : (
21
+ < ul >
22
+ { todos ?. map ( ( todo ) => (
23
+ < li key = { todo . id } > { todo . title } </ li >
24
+ ) ) }
25
+ </ ul >
26
+ ) }
27
+ </ >
23
28
) }
24
29
</ fieldset >
25
30
) ;
You can’t perform that action at this time.
0 commit comments