aboutsummaryrefslogtreecommitdiff
path: root/src/features/todo
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-17 22:18:32 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-17 22:18:32 -0600
commit02376ac97fbdd794cc487dd6d1131fb8c925c890 (patch)
treed5d91e9966e56d0f82dfdd11048b92931e5790bb /src/features/todo
parent335543d369de2190a8a0591553117ea525ba1380 (diff)
downloadToDo-App-FE-02376ac97fbdd794cc487dd6d1131fb8c925c890.tar.gz
ToDo-App-FE-02376ac97fbdd794cc487dd6d1131fb8c925c890.zip
Displayed correct index.
Index was hard-coded. Now it retrieves current last index used.
Diffstat (limited to 'src/features/todo')
-rw-r--r--src/features/todo/reducer.js1
1 files changed, 1 insertions, 0 deletions
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;