Use appDispatch instead (#2114)

This commit is contained in:
Javier Adriel
2022-06-10 16:33:17 -05:00
committed by GitHub
parent 0b5e3d5a10
commit 296f58f43d

View File

@@ -17,15 +17,15 @@
import React, { Fragment } from "react";
import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import { setUserName } from "./AddUsersSlice";
import { useDispatch, useSelector } from "react-redux";
import {AppState} from "../../../store";
import { useSelector } from "react-redux";
import {AppState, useAppDispatch} from "../../../store";
interface IAddUserProps2 {
classes: any;
}
const UserSelector = ({ classes }: IAddUserProps2 ) => {
const dispatch = useDispatch();
const dispatch = useAppDispatch();
const userName = useSelector(
(state: AppState) => state.createUser.userName
)