diff --git a/components/Organizer/AnalyticsTab/AnalyticsTab.tsx b/components/Organizer/AnalyticsTab/AnalyticsTab.tsx index 42e2ccec..262b2c80 100644 --- a/components/Organizer/AnalyticsTab/AnalyticsTab.tsx +++ b/components/Organizer/AnalyticsTab/AnalyticsTab.tsx @@ -1,7 +1,7 @@ import { Table } from 'antd'; import useSWR from 'swr'; -import { DietaryData, ResponseError } from '../../../types/database'; +import { DietaryData, ResponseError, UserData } from '../../../types/database'; import { RequestType, useCustomSWR } from '../../../utils/request-utils'; import React, { useState, useRef, useEffect } from 'react'; @@ -34,9 +34,17 @@ export default function Analytics() { })) : undefined; + // Hacker data + const { data: hackersData, error: hackersError } = useCustomSWR({ + url: '/api/users?usertype=HACKER', + method: RequestType.GET, + errorMessage: 'Failed to get list of hackers.', + }); + return ( <>
+

Hacker Count: {hackersData?.length}

); }