mirror of
https://github.com/ershisan99/it-incubator-todolist-ts-17-live-2024-08-17.git
synced 2026-02-05 05:12:08 +00:00
chore: refactor todolists reducer to export selectors
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
fetchTodolistsTC,
|
||||
FilterValues,
|
||||
removeTodolistTC,
|
||||
TodolistDomain,
|
||||
selectTodolists,
|
||||
} from './todolists-reducer'
|
||||
import {
|
||||
addTaskTC,
|
||||
@@ -29,9 +29,7 @@ type Props = {
|
||||
}
|
||||
|
||||
export const TodolistsList: React.FC<Props> = ({ demo = false }) => {
|
||||
const todolists = useSelector<AppRootState, Array<TodolistDomain>>(
|
||||
(state) => state.todolists
|
||||
)
|
||||
const todolists = useSelector(selectTodolists)
|
||||
const tasks = useSelector<AppRootState, TasksState>((state) => state.tasks)
|
||||
const isLoggedIn = useSelector(selectIsLoggedIn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user