From 02376ac97fbdd794cc487dd6d1131fb8c925c890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Wed, 17 May 2023 22:18:32 -0600 Subject: Displayed correct index. Index was hard-coded. Now it retrieves current last index used. --- src/features/todo/reducer.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/features/todo') diff --git a/src/features/todo/reducer.js b/src/features/todo/reducer.js index 29422e9..e3e2470 100644 --- a/src/features/todo/reducer.js +++ b/src/features/todo/reducer.js @@ -28,5 +28,6 @@ export const todo_slice = createSlice({ export const { add_todo } = todo_slice.actions; export const select_todos = (state) => state.todo_list.todos; +export const select_last_index = (state) => state.todo_list.last_id; export default todo_slice.reducer; -- cgit v1.2.3