-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
update userprofile to mui #1766
base: development
Are you sure you want to change the base?
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 |
---|---|---|
|
@@ -4,31 +4,65 @@ import UserTable from '../components/presentational/profile/UserTable'; | |
import UserEvents from '../components/presentational/profile/UserEvents'; | ||
import UserTeams from '../components/presentational/profile/UserTeams'; | ||
import { UserProvider, UserContext } from '../context/userContext'; | ||
import { Box, Typography, Grid } from '@mui/material'; | ||
|
||
const UserProfile = (props) => ( | ||
<UserProvider> | ||
<div> | ||
<div className="profile__header"> | ||
<h3 className="profile__title">My Profile</h3> | ||
</div> | ||
<Box> | ||
<Box style={{ backgroundColor: '#bad3ff' }}> | ||
<Typography | ||
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. Curious if one of these is redundant, I tought that Typography variant="h3" would make this component an h3 element already |
||
variant="h3" | ||
component="h3" | ||
style={{ | ||
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. We may be able to have this be declared through the MUI config file later on |
||
fontSize: '24px', | ||
fontFamily: 'Source Code Pro, monospace', | ||
padding: '5px 23.4844px', | ||
fontWeight: 800, | ||
}} | ||
> | ||
My Profile | ||
</Typography> | ||
</Box> | ||
<UserContext.Consumer> | ||
{({ user, removeOption }) => ( | ||
<UserTable context={{ user, removeOption }} /> | ||
)} | ||
</UserContext.Consumer> | ||
<div className="profile__header"> | ||
<h3 className="profile__subtitle">My Upcoming Events</h3> | ||
</div> | ||
<Box style={{ backgroundColor: '#bad3ff' }}> | ||
<Typography | ||
variant="h4" | ||
component="h4" | ||
style={{ | ||
fontSize: '18.4px', | ||
fontFamily: 'Source Code Pro, monospace', | ||
padding: '5px 23.4844px', | ||
fontWeight: 800, | ||
}} | ||
> | ||
My Upcoming Events | ||
</Typography> | ||
</Box> | ||
<UserContext.Consumer> | ||
{({ events }) => <UserEvents context={{ events }} />} | ||
</UserContext.Consumer> | ||
<div className="profile__header"> | ||
<h3 className="profile__subtitle">My Teams</h3> | ||
</div> | ||
<Box style={{ backgroundColor: '#bad3ff' }}> | ||
<Typography | ||
variant="h4" | ||
component="h4" | ||
style={{ | ||
fontSize: '18.4px', | ||
fontFamily: 'Source Code Pro, monospace', | ||
padding: '5px 23.4844px', | ||
fontWeight: 800, | ||
}} | ||
> | ||
My Teams | ||
</Typography> | ||
</Box> | ||
<UserContext.Consumer> | ||
{({ teams }) => <UserTeams context={{ teams }} />} | ||
</UserContext.Consumer> | ||
</div> | ||
</Box> | ||
</UserProvider> | ||
); | ||
|
||
|
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.
Eventually change hex code to a stored variable, but for now this fine