Create registerMember admin component
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { useState, useContext } from "react";
|
||||
import { useContext } from "react";
|
||||
import styles from "./AdminPage.module.css";
|
||||
import ParticipationChart from "./components/chart/ParticipationChart.jsx";
|
||||
import IncompleteEvents from "./components/IncompleteEvent/IncompleteEvent.jsx";
|
||||
import PendingMembers from "./components/pendingMembers/PendingMembers.jsx";
|
||||
import { AuthContext } from "../../contexts/auth/AuthContext.js";
|
||||
import { useNavigate } from "react-router";
|
||||
import RegisterMember from "./components/registerMember/registerMember.tsx";
|
||||
|
||||
|
||||
function AdminPage() {
|
||||
@@ -12,18 +12,11 @@ function AdminPage() {
|
||||
const { user } = useContext(AuthContext);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [selected, setSelected] = useState("3");
|
||||
const [participationRate] = useState(89);
|
||||
|
||||
if(!user.isAdmin) navigate("/");
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<ParticipationChart
|
||||
selected={selected}
|
||||
setSelected={setSelected}
|
||||
participationRate={participationRate}
|
||||
/>
|
||||
<RegisterMember />
|
||||
<div className={styles.rightSection}>
|
||||
<IncompleteEvents />
|
||||
<PendingMembers />
|
||||
|
||||
Reference in New Issue
Block a user