diff --git a/React-frontend/src/pages/admin/SearchUser.js b/React-frontend/src/pages/admin/SearchUser.js new file mode 100644 index 00000000..df427dc7 --- /dev/null +++ b/React-frontend/src/pages/admin/SearchUser.js @@ -0,0 +1,39 @@ +/* +* Component to display all the members of an admin. +*/ + +import React, { useEffect, useState } from 'react' +import Layout from '../../components/core/Layout' +import ShowMembers from '../../components/Admin/ShowMembers'; +import HomeLogo from '../../components/core/HomeLogo'; +import { useSelector, useDispatch } from 'react-redux'; +import { fetchMembers } from '../../store/actions/admin'; +import { set } from 'date-fns'; + +const SearchUser = () => { + // auth reducer + const auth = useSelector(state => state.auth) + const dispatch = useDispatch() + const {extractors, managements, isLoading} = useSelector(state => state.admin) + + useEffect(() => { + dispatch(fetchMembers()) + }, [dispatch]) + + if(auth && auth.isAuthenticated){ + return ( +