diff --git a/src/modules/user/UserList.tsx b/src/modules/user/UserList.tsx index 100adff..4cb7b8a 100644 --- a/src/modules/user/UserList.tsx +++ b/src/modules/user/UserList.tsx @@ -1,7 +1,8 @@ import { FC } from "react"; +import { useDispatch } from "react-redux"; import SearchableList from "components/SearchableList"; -import { UserMap } from "modules/user/slice"; +import { UserMap, userGetAll } from "modules/user/slice"; import UserListEntry from "modules/user/UserListEntry"; const SearchableUserList = SearchableList(UserListEntry); @@ -10,6 +11,27 @@ interface Props { users: UserMap; } -const UserList: FC = ({ users }) => ; +const UserList: FC = ({ users }) => { + const dispatch = useDispatch(); + + const onClick: ReactEventHandler = (event) => { + event.preventDefault(); + dispatch(userGetAll()); + }; + + return ( +
+
+

+ Users +

+ +
+ +
+ ); +}; export default UserList;