diff --git a/src/components/icons/Database.svg b/src/components/icons/Database.svg new file mode 100755 index 00000000..64219898 --- /dev/null +++ b/src/components/icons/Database.svg @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/components/icons/index.ts b/src/components/icons/index.ts index a84306a7..03d3710d 100644 --- a/src/components/icons/index.ts +++ b/src/components/icons/index.ts @@ -4,6 +4,7 @@ export { default as CircledCheck } from "./CircledCheck.svg"; export { default as CircledCheckSolid } from "./CircledCheckSolid.svg"; export { default as CircledCross } from "./CircledCross.svg"; export { default as Clipboard } from "./Clipboard.svg"; +export { default as Database } from "./Database.svg"; export { default as Edit } from "./Edit.svg"; export { default as Filter } from "./Filter.svg"; export { default as Home } from "./Home.svg"; diff --git a/src/layouts/TabLayout/AdminTabLayout.tsx b/src/layouts/TabLayout/AdminTabLayout.tsx index f84de9f6..afea3bc8 100644 --- a/src/layouts/TabLayout/AdminTabLayout.tsx +++ b/src/layouts/TabLayout/AdminTabLayout.tsx @@ -2,6 +2,7 @@ import { Clipboard, Edit, Home, + Database, Settings, User, Users, @@ -17,6 +18,11 @@ const AdminTabLayout: React.FC = ({ return ( + { + const { currentProgram } = useCurrentProgram(); + const { programId } = currentProgram || { + programId: "" + }; + + const mentors = useGetProfilesQuery({ + variables: { + programId: programId, + profileType: ProfileType.Mentor, + }, + }); + + const mentees = useGetProfilesQuery({ + variables: { + programId: programId, + profileType: ProfileType.Mentee, + }, + }); + + if (!currentProgram || mentors.error || mentees.error) return ; + + return ( + + + Dashboard + +
+ +
+ + Mentors (#): + + + {mentors.data?.getProfiles.length} + + + Mentees (#): + + + {mentees.data?.getProfiles.length} + +
+
+
+ ); +}; + +DashboardPage.getLayout = (page, pageProps) => ( + + + {page} + + +); + +export default DashboardPage;