-
Notifications
You must be signed in to change notification settings - Fork 33
Profile Page (with backend integration) and Discussion Page added #54
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for working on this, @JhansiMatcha! Seems like there is something wrong with the proposed changes in this PR. These changes give a blank screen for the Profile page, as can be seen in the image. |
|
@gunjjoshi |
| <Image | ||
| className="rounded-full" | ||
| src={photoURL} | ||
| src={photoURL || '/default-profile.jpg'} |
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.
@JhansiMatcha We do not have this default picture yet in the public folder yet.
| const logout = async () => { | ||
| try { | ||
| await signOut(firebaseAuth); | ||
| await signOut(auth); |
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.
@JhansiMatcha Was there any particular reason for using the variable name from firebaseAuth to auth?
|
|
||
| try { | ||
| const res = await signInWithPopup(firebaseAuth, provider); | ||
| const res = await signInWithPopup(auth, provider); |
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.
Same comment here and everywhere else in this file, regarding the use of auth instead of firebaseAuth.
src/contexts/auth.tsx
Outdated
| const { picture, name, isAdmin } = user; | ||
| if (user) { | ||
| setUser(user); | ||
| setPhotoURL(picture); | ||
| setDisplayName(name); |
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.
@JhansiMatcha Any specific need to avoid destructuring and accessing the user object multiple times, rather than using it just once, as it is being done currently?
| const collegesData = { | ||
| iits: ['IIT Bombay', 'IIT Delhi', 'IIT Madras', 'IIT Kanpur', 'IIT Kharagpur'], | ||
| nits: ['NIT Trichy', 'NIT Warangal', 'NIT Surathkal', 'NIT Calicut', 'NIT Rourkela'], | ||
| iiits: ['IIIT Hyderabad', 'IIIT Bangalore', 'IIIT Delhi', 'IIIT Allahabad', 'IIIT Jabalpur'], | ||
| other: [], // For user-added colleges | ||
| }; |
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.
@JhansiMatcha We don't need these pre-determined college names. Let's just keep an option to enable the college admin to fill up the details by himself/herself, for setting up the initial template.
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.
You'll have to set up the backend logic for this, which doesn't seem to be present as of now.
|
@JhansiMatcha Had an initial round of review. This PR might still need some work to be able to get in. |

PR Description
Created a Profile Page featuring:
Discussion Page:
College Templates UI (New Update)
The backend will be fixed soon so that on adding the colleges which aren't present can be stored as well.