import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Link } from "react-router-dom"; import PropTypes from "prop-types"; const AddUser = (props) => { var [users, setUsers] = useState([]), [admin, setAdmin] = useState(false), [errorAlert, setErrorAlert] = useState(null), limit = useSelector((state) => state.limit); var dispatch = useDispatch(); var dispatchPageChange = (data, page) => { dispatch({ type: "USER_PAGE", value: { data: data, page: page, }, }); }; var { addUsers, failRegexEvent, updateUsers, history } = props; return ( <>
{errorAlert != null ? (
{errorAlert}
) : ( <> )}

Add Users



setAdmin(!admin)} />
); }; AddUser.propTypes = { addUsers: PropTypes.func, failRegexEvent: PropTypes.func, updateUsers: PropTypes.func, history: PropTypes.shape({ push: PropTypes.func, }), }; export default AddUser;