Skip to content
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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 45 additions & 11 deletions client/src/pages/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Member

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

<Box style={{ backgroundColor: '#bad3ff' }}>
<Typography
Copy link
Member

Choose a reason for hiding this comment

The 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={{
Copy link
Member

Choose a reason for hiding this comment

The 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>
);

Expand Down
Loading