diff --git a/src/components/Pools.tsx b/src/components/Pools.tsx index b5c1457..f7a5d1a 100644 --- a/src/components/Pools.tsx +++ b/src/components/Pools.tsx @@ -105,7 +105,7 @@ const Pools = () => {
Start Time: {pool.start_time}
End Time: {pool.end_time}
-+
{maybePluralize(pool.comments.length, 'comment')}
diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index 973c036..9178377 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -1,154 +1,107 @@ -import Button from '@material-ui/core/Button'; -import Card from '@material-ui/core/Card'; -import CardActionArea from '@material-ui/core/CardActionArea'; -import CardActions from '@material-ui/core/CardActions'; -import CardContent from '@material-ui/core/CardContent'; -import { makeStyles } from '@material-ui/core/styles'; -import Typography from '@material-ui/core/Typography'; -import { useContext, useEffect, useState } from 'react'; -import { API_ENDPOINT } from '../api/api'; -import AuthenticationContext from './AuthenticationContext'; +import { CenterFocusStrong } from '@material-ui/icons'; +import React, { useState, useEffect } from 'react'; -const useStyles = makeStyles({ - root: { - maxWidth: 345, - }, - media: { - height: 140, - }, -}); +const maybePluralize = (count: number, noun: string, suffix = 's') => + `${count} ${noun}${count !== 1 ? suffix : ''}`; const Profile = () => { - const { user, isLoggedIn } = useContext(AuthenticationContext); - const [groups, setGroups] = useState+ Capacity: {pool.participant_ids.length} / {pool.capacity} +
+Start Time: {pool.start_time}
+End Time: {pool.end_time}
++ {maybePluralize(pool.comments.length, 'comment')} +
+