-
Notifications
You must be signed in to change notification settings - Fork 38
Modified Routing Options in Index Page #177
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?
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 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -243,7 +243,7 @@ | |||||||||||||||
| <div className={styles.identityLeft}> | ||||||||||||||||
| <div className={styles.avatarWrapper}> | ||||||||||||||||
| <div className={styles.avatar}> | ||||||||||||||||
| <img | ||||||||||||||||
|
Check warning on line 246 in src/common/components/Profile/Profile.tsx
|
||||||||||||||||
| src={previewUrl || profilePhotoUrl || `https://ui-avatars.com/api/?name=${encodeURIComponent(user.fullname || user.username)}&background=f59e0b&color=fff&bold=true`} | ||||||||||||||||
| alt="Profile" | ||||||||||||||||
| className={styles.avatarImage} | ||||||||||||||||
|
|
@@ -269,7 +269,7 @@ | |||||||||||||||
|
|
||||||||||||||||
| {isOwnProfile && ( | ||||||||||||||||
| <button className={styles.editButton} onClick={handleEditToggle}> | ||||||||||||||||
| <HiPencilSquare size={16} /> EDIT | ||||||||||||||||
| {(isEditing) ? (<>Scroll Down 👇</>):<><HiPencilSquare size={16} /> EDIT</>} | ||||||||||||||||
| </button> | ||||||||||||||||
|
Comment on lines
271
to
273
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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use an action-accurate label for the edit toggle. While editing, this button still calls Proposed fix- {(isEditing) ? (<>Scroll Down 👇</>):<><HiPencilSquare size={16} /> EDIT</>}
+ {isEditing ? 'Cancel Edit' : <><HiPencilSquare size={16} /> EDIT</>}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| )} | ||||||||||||||||
| </div> | ||||||||||||||||
|
|
@@ -304,7 +304,7 @@ | |||||||||||||||
|
|
||||||||||||||||
| {/* Mascot column */} | ||||||||||||||||
| <div className={styles.mascotWrapper}> | ||||||||||||||||
| <img | ||||||||||||||||
|
Check warning on line 307 in src/common/components/Profile/Profile.tsx
|
||||||||||||||||
| src="/images/foldHands.png" | ||||||||||||||||
| alt="Mascot" | ||||||||||||||||
| className={styles.separateAccentImg} | ||||||||||||||||
|
|
@@ -451,7 +451,7 @@ | |||||||||||||||
| <div className={styles.formActions}> | ||||||||||||||||
| <button className={styles.cancelBtn} onClick={handleEditToggle} disabled={loading}>Abort</button> | ||||||||||||||||
| <button className={styles.saveBtn} onClick={handleSave} disabled={loading}> | ||||||||||||||||
| {loading ? 'UPLOADING...' : 'SAVE CHANGES'} | ||||||||||||||||
| {loading ? 'Uploading...' : 'Save Changes'} | ||||||||||||||||
| </button> | ||||||||||||||||
| </div> | ||||||||||||||||
| </div> | ||||||||||||||||
|
|
||||||||||||||||
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.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Stale auth state — Header won't reflect logout without a page refresh.
The
useEffectreadsauthUserfromlocalStorageonly on mount. If the user logs out elsewhere (e.g., viaonAuthStateChangedin_app.tsxwhich callslocalStorage.removeItem("authUser")), the Header will continue displaying "Dashboard : displayName" until a full page reload. Consider syncing with the Firebase auth listener or listening tostorageevents for cross-tab updates.Additionally,
console.logshould beconsole.errorfor caught exceptions, and the settersetUserdetailshas inconsistent casing vs the state variableuserDetails.🤖 Prompt for AI Agents