-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finished team page layout and photo fetching for participants #1543
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,9 @@ | |
padding: 1em; | ||
border-radius: 0.5em; | ||
} | ||
|
||
.avatar { | ||
width: 4rem; | ||
height: 4rem; | ||
margin: 0 1rem 0 0; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@import '../../../../vars'; | ||
|
||
.teamHeader { | ||
padding-bottom: 0.5em; | ||
} | ||
|
||
// if desired, this should just be a global change and | ||
// universally applied to all 360 cards | ||
.cardHeader { | ||
background-color: $primary-blue; | ||
color: $neutral-white; | ||
} | ||
|
||
.grayText { | ||
color: $neutral-gray; | ||
} | ||
|
||
.listing { | ||
margin: 0.3em 0; | ||
} | ||
|
||
:global(.MuiCardHeader-root).cardHeader { | ||
padding: 0.7em 16px; | ||
} | ||
|
||
.cardHeader :global(.MuiCardHeader-title) { | ||
font-size: 1em; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,80 @@ | ||
import { Grid, Typography, Card, CardHeader, CardContent, List } from '@material-ui/core/'; | ||
import { useParams } from 'react-router'; | ||
import styles from './Team.module.css'; | ||
import { ParticipantListing, MatchListing } from '../../components/Listing'; | ||
import GordonLoader from 'components/Loader'; | ||
import GordonUnauthorized from 'components/GordonUnauthorized'; | ||
import { useUser } from 'hooks'; | ||
|
||
let rosterCard = ( | ||
<Card> | ||
<CardHeader title="Roster" className={styles.cardHeader} /> | ||
<CardContent> | ||
{/*This is hardcoded data for now, in the future, roster card should | ||
be a react component that takes a set of users and maps them here*/} | ||
<List> | ||
<ParticipantListing username={'silas.white'} /> | ||
<ParticipantListing username={'amos.cha'} /> | ||
</List> | ||
</CardContent> | ||
</Card> | ||
); | ||
|
||
// CARD - schedule | ||
let scheduleCard = ( | ||
<Card> | ||
<CardHeader title="Schedule" className={styles.cardHeader} /> | ||
<CardContent> | ||
{/* if there are games scheduled, map them here */} | ||
<div className={styles.listing}> | ||
<MatchListing activityID={123456} matchID={321} /> | ||
</div> | ||
<div className={styles.listing}> | ||
<MatchListing activityID={123456} matchID={654} /> | ||
</div> | ||
{/* else "no schedule yet set" */} | ||
<Typography variant="body1" paragraph> | ||
Games have not yet been scheduled. | ||
</Typography> | ||
</CardContent> | ||
</Card> | ||
); | ||
|
||
const Team = () => { | ||
const { activityID, teamID } = useParams(); | ||
return ( | ||
<p> | ||
Here with activity id {activityID} team id {teamID} | ||
</p> | ||
); | ||
const { profile, loading } = useUser(); | ||
|
||
if (loading) { | ||
return <GordonLoader />; | ||
} else if (!profile) { | ||
// The user is not logged in | ||
return <GordonUnauthorized feature={'the Rec-IM page'} />; | ||
} else { | ||
return ( | ||
<> | ||
<Grid container alignItems="center" className={styles.activityHeader}> | ||
<Grid item> | ||
<img src={''} alt="Team Icon" width="85em"></img> | ||
</Grid> | ||
| ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this is a temporary or permanent fix to the spacing issue? I'll assume it's temporary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a Cam question, as it was in his code for the activity/home page layout that I tried to mimic. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haha yeah temporary, we can change it at some point. |
||
<Grid item> | ||
<Typography variant="h5">Team Name</Typography> | ||
</Grid> | ||
</Grid> | ||
<Grid container justifyContent="center" spacing={2}> | ||
<Grid item xs={12} md={6}> | ||
{scheduleCard} | ||
</Grid> | ||
<Grid item xs={12} md={6}> | ||
{rosterCard} | ||
</Grid> | ||
</Grid> | ||
<p> | ||
Activity ID: {activityID} Team ID: {teamID} (for testing purposes only) | ||
</p> | ||
</> | ||
); | ||
} | ||
}; | ||
|
||
export default Team; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the user hook has a fullName field that we could use for a clean first/last name. I did a little bit of digging and we can't really get the gordon id very easily from the hook so we might need to add an AD_Username to a Participant viewmodel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good note for the future!