-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
help wantedExtra help would be great!Extra help would be great!
Description
🎯 due Monday, April 8th
Currently, we have two components that represent the visual header for the home pages: photoHeader.tsx and adminPhotoHeader.tsx. They should look the same; so, in this ticket, we're going to use the adminPhotoHeader in both places.
- First, move the contents of
adminPhotoHeader.tsxtophotoHeader.tsx, and delete the oldadminPhotoHeader.tsxfile. Go intostudent-home.tsxandadmin-home.tsxand use this new component in both places. - Then, update the sizing on the photo header. Right now, the photo header has a "fixed height" of "200px", but stretches and resizes on resize of the page (while the translucent white overlay stays the same height). We'd like to change it so that the photo header is always 150px; and, so that the translucent white overlay is always half the height of the overall header (75px).
Then, we'd like to fix a few of the visual details in the photo header's profile section.
- Currently, the profile image stretches to fit its square frame. Change this so that the image isn't stretched, but simply cropped on overflow.
- Make the "Name" and "email" text a little bit bigger! Name as
text-lgand email astext-mdshould be good.
Finally, hooking up the photoHeader's profile section! Right now, photoHeader takes name, email, and image props to represent a given Student or Admin's account information. This information is pulled from the session user, validated in a getServerSideProps() function in admin-home.tsx. We'd like to copy this work into student-home.tsx.
- Copy the full definition of function
getServerSidePropsinadmin-home.tsxintostudent-home.tsx: starting at line300(export const getServerSideProps = async (...) to line366(return { props: { ... }, }; };). Remove the check for the user's admin status, so that non-admin users aren't rerouted to the home page on accessingstudent-home. - Then, reference
admin-home.tsxfor guidance on how to pass valuesname,email, andimageinto yourphotoHeadercomponent on the student page!
Metadata
Metadata
Assignees
Labels
help wantedExtra help would be great!Extra help would be great!