Skip to content

fix: remove duplicate logout button from dashboard page#54

Open
madhavbansal3006 wants to merge 3 commits into
kunalverma2512:mainfrom
madhavbansal3006:fix/duplicate-logout-button
Open

fix: remove duplicate logout button from dashboard page#54
madhavbansal3006 wants to merge 3 commits into
kunalverma2512:mainfrom
madhavbansal3006:fix/duplicate-logout-button

Conversation

@madhavbansal3006

@madhavbansal3006 madhavbansal3006 commented May 15, 2026

Copy link
Copy Markdown

Fixes #49

Removed the duplicate logout button hardcoded inside
the Dashboard header. The navbar already has a logout
button. Also cleaned up unused imports and functions.

Summary by CodeRabbit

  • Refactor
    • Removed the Logout button and local logout action from the dashboard header, simplifying the header UI.
    • Dashboard no longer performs an in-header logout redirect, streamlining navigation flow.
    • All other dashboard behavior remains unchanged: loading state handling, external connection widgets, and modal/AI insight flows preserved.

@github-actions

Copy link
Copy Markdown

🚀 PR Received Successfully

Hello @madhavbansal3006,

Thank you for taking the initiative to contribute to this project.

Please ensure that your PR follows all project guidelines properly before requesting review.

⚠️ Important Instructions

  • Maintain proper code quality and structure
  • Do not make unnecessary changes/files
  • Ensure responsiveness across devices
  • Follow existing project conventions strictly
  • Attach screenshots/videos for UI-related changes
  • Resolve merge conflicts before requesting review
  • Avoid AI-generated low quality PRs or copied implementations

📌 Mandatory for GSSoC'26 Participants

Joining the community group and announcement channel is compulsory for all contributors participating through GSSoC'26.

Failure to follow contribution guidelines may lead to PR rejection.

We appreciate your effort and wish you a great open-source journey ahead. ✨

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 743c60bd-c5f6-44f1-8da1-0477120a5b38

📥 Commits

Reviewing files that changed from the base of the PR and between dd69b9d and 915f56c.

📒 Files selected for processing (1)
  • frontend/src/pages/DashboardPage.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/pages/DashboardPage.jsx

📝 Walkthrough

Walkthrough

DashboardPage stops destructuring logout from useAuth, removes the local handleLogout (and its navigate usage), and deletes the header "Logout" button so the dashboard no longer initiates logout; navbar remains the single logout trigger.

Changes

Remove Duplicate Logout Button

Layer / File(s) Summary
Remove inline logout usage and header button
frontend/src/pages/DashboardPage.jsx
useAuth is now destructured to only user and loading; the component-local handleLogout (which called logout() and navigated to /) is removed; the header "Logout" button and its onClick handler are deleted; trailing newline added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

quality:clean, type:refactor, level:intermediate

Poem

🐰 A button hopped away today,
The navbar keeps the only way.
I nudged the handler from the view—
One logout now, tidy and true. 🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks the structured template format with required sections like Type of Change checkboxes, Testing verification, and a proper Checklist. Add structured sections matching the template: Type of Change (with checkboxes), Testing section, and Checklist to ensure completeness and standardization.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically describes the main change: removing a duplicate logout button from the dashboard page.
Linked Issues check ✅ Passed The PR successfully addresses issue #49 by removing the duplicate logout button and cleaning up unused functions, meeting all stated coding requirements.
Out of Scope Changes check ✅ Passed All changes are directly related to removing the duplicate logout button and associated unused code; no extraneous modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kunalverma2512

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@kunalverma2512

Copy link
Copy Markdown
Owner

@madhavbansal3006 provide video for this change

@kunalverma2512

Copy link
Copy Markdown
Owner

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@kunalverma2512 kunalverma2512 added enhancement New feature or request good first issue Good for newcomers Frontend UI/UX labels May 15, 2026
@madhavbansal3006

Copy link
Copy Markdown
Author

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,

Since the fix removes a hardcoded button from the code,
here is a before/after comparison:

Before: Two logout buttons were visible — one in navbar
and one inside the dashboard body

After: Only the navbar logout button remains. The duplicate
button and its unused handleLogout function have been removed.

I can provide a demo video if you can share how to
run the project locally, because i am facing problem in creating account on website.

@kunalverma2512

Copy link
Copy Markdown
Owner

@madhavbansal3006 in telegram group you can discuss with peers
make sure to join telegram group and channel

@kunalverma2512

Copy link
Copy Markdown
Owner

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,

Since the fix removes a hardcoded button from the code, here is a before/after comparison:

Before: Two logout buttons were visible — one in navbar and one inside the dashboard body

After: Only the navbar logout button remains. The duplicate button and its unused handleLogout function have been removed.

I can provide a demo video if you can share how to run the project locally, because i am facing problem in creating account on website.

show a video for your work

@madhavbansal3006

Copy link
Copy Markdown
Author

@madhavbansal3006 provide video for this change

Hi @kunalverma2512,
Since the fix removes a hardcoded button from the code, here is a before/after comparison:
Before: Two logout buttons were visible — one in navbar and one inside the dashboard body
After: Only the navbar logout button remains. The duplicate button and its unused handleLogout function have been removed.
I can provide a demo video if you can share how to run the project locally, because i am facing problem in creating account on website.

show a video for your work

I have attached the 'after' screenshot. Since I am having trouble with the local account creation/login to capture a video, please let me know if there are specific logs or setup steps I should check to get the dashboard fully running for a demo.
Screenshot 2026-05-15 211104

@kunalverma2512

Copy link
Copy Markdown
Owner

@madhavbansal3006 you havent discussed in community , then how will you are going to understand codebase

@madhavbansal3006

Copy link
Copy Markdown
Author

Hi @kunalverma2512,

Thanks for the feedback! I wasn't aware that discussing in the community first was a requirement before submitting a PR. I'll definitely follow that process from now on.

Could you guide me to the right place to have these discussions (Discord, GitHub Discussions, etc.)? I want to contribute properly and understand the codebase better with the community's help.

Please let me know how you'd like me to proceed with this PR.

@kunalverma2512

Copy link
Copy Markdown
Owner

join this community group and try to be active from now - click here

@Deniwn22 Deniwn22 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement overall. One edge case: empty string vs null aren't treated the same downstream — might need a normalization step.

@madhavbansal3006

Copy link
Copy Markdown
Author

Hi @Deniwn22, thank you for the review!

I've resolved the merge conflict in DashboardPage.jsx. Regarding your edge case feedback about empty string vs null — I'll add a normalization step to handle both cases consistently before the data flows downstream.

Will push the updated changes shortly. Please have a look once done!

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

This pull request has been marked as stale due to inactivity. Please add updates or commits to keep it active.

@github-actions github-actions Bot added the Stale label Jun 3, 2026
@kunalverma2512

kunalverma2512 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@Deniwn22 Hi, are you interested to be a mentor here ?

@github-actions github-actions Bot removed the Stale label Jun 4, 2026
@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

@madhavbansal3006 is attempting to deploy a commit to the Kunal Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend good first issue Good for newcomers UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Duplicate logout button appears on Dashboard page

3 participants