🎯 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.
Then, we'd like to fix a few of the visual details in the photo header's profile section.
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.
🎯 due Monday, April 8th
Currently, we have two components that represent the visual header for the home pages:
photoHeader.tsxandadminPhotoHeader.tsx. They should look the same; so, in this ticket, we're going to use theadminPhotoHeaderin both places.adminPhotoHeader.tsxtophotoHeader.tsx, and delete the oldadminPhotoHeader.tsxfile. Go intostudent-home.tsxandadmin-home.tsxand use this new component in both places.Then, we'd like to fix a few of the visual details in the photo header's profile section.
text-lgand email astext-mdshould be good.Finally, hooking up the photoHeader's profile section! Right now, photoHeader takes
name,email, andimageprops to represent a given Student or Admin's account information. This information is pulled from the sessionuser, validated in agetServerSideProps()function inadmin-home.tsx. We'd like to copy this work intostudent-home.tsx.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.admin-home.tsxfor guidance on how to pass valuesname,email, andimageinto yourphotoHeadercomponent on the student page!