import React, { useState, useEffect, useReducer, useContext } from 'react'; import { BrowserRouter as Router, Switch, Route, Link, useParams, useHistory } from 'react-router-dom'; import { Button, Container, Checkbox, Dimmer, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; import { BarChart, Bar, LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, ReferenceLine } from 'recharts'; import { apiUrl, statusColor, BasicTable, staticUrl, requester } from './utils.js'; import { NotFound } from './Misc.js'; let memberCountCache = false; let signupCountCache = false; let spaceActivityCache = false; export function Charts(props) { const [memberCount, setMemberCount] = useState(memberCountCache); const [signupCount, setSignupCount] = useState(signupCountCache); const [spaceActivity, setSpaceActivity] = useState(spaceActivityCache); useEffect(() => { requester('/charts/membercount/', 'GET') .then(res => { setMemberCount(res); memberCountCache = res; }) .catch(err => { console.log(err); }); requester('/charts/signupcount/', 'GET') .then(res => { setSignupCount(res); signupCountCache = res; }) .catch(err => { console.log(err); }); requester('/charts/spaceactivity/', 'GET') .then(res => { setSpaceActivity(res); spaceActivityCache = res; }) .catch(err => { console.log(err); }); }, []); return (
Charts
Member Counts

Daily since March 2nd, 2020.

{memberCount && }

The Member Count is the amount of Prepaid, Current, Due, and Overdue members on Spaceport.

The Green Count is the amount of Prepaid and Current members.

Space Activity

Daily since March 7th, 2020, updates hourly.

{spaceActivity && }

Cards Scans is the number of individual members who have scanned to enter the space.

Signup Count

Monthly for the last sixteen months, updates daily.

{signupCount && }

The Signup Count is the number of brand new account registrations that month.

The Vetted Count is the number of those signups who eventually got vetted (at a later date).

The Retain Count is the number of those signups who are still a member currently.

); };