Skip to content

Resolve Double Navbar Overlap on Dashboard & Layout Conflicts#319

Merged
santanu-atta03 merged 3 commits into
santanu-atta03:mainfrom
karthikc1125:main
Feb 20, 2026
Merged

Resolve Double Navbar Overlap on Dashboard & Layout Conflicts#319
santanu-atta03 merged 3 commits into
santanu-atta03:mainfrom
karthikc1125:main

Conversation

@karthikc1125

@karthikc1125 karthikc1125 commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

🐛 Problem

The Dashboard page was rendering two navigation bars simultaneously:

Global from App.jsx

Internal Dashboard navigation/header

This caused:

Navbar stacking/overlapping at the top

Layout shifting issues

Content being pushed or hidden

Inconsistent spacing across routes

Additionally, several pages had content rendering beneath the fixed global navbar due to missing layout offset.

✅ Fixes Implemented
1️⃣ Removed Duplicate Navbar Rendering

Updated App.jsx to conditionally render the global

Hidden global navbar on routes that include their own internal navigation:

/dashboard

/settings

/pricing

/career

/interview-setup

/interview-room

Complex interactive/dashboard-style pages

This ensures only one navigation bar is rendered per route.

2️⃣ Fixed Content Hidden Behind Fixed Navbar

Added consistent top spacing (pt-32) to pages that rely on the global fixed navbar:

Auth pages (Login, Register, Verify Email)

Domain selection

Analytics

Advanced Features Dashboard

Practice Lab

Blog Platform

Results

This guarantees content always renders below the navbar.

3️⃣ Centralized Layout Control

Consolidated navbar + footer visibility logic inside App.jsx

Simplified route-based layout handling

Made navigation behavior predictable and scalable for future pages

🎯 Result

✅ No more double navbar rendering

✅ No overlapping headers

✅ Consistent spacing across all pages

✅ Improved route-based layout structure

✅ Cleaner and more maintainable navigation logic

Before

Screenshot from 2026-02-19 13-37-30 Screenshot from 2026-02-19 13-37-42

After

Screenshot from 2026-02-19 14-29-48 Screenshot from 2026-02-19 14-30-06

Copilot AI review requested due to automatic review settings February 19, 2026 16:28
@vercel

vercel Bot commented Feb 19, 2026

Copy link
Copy Markdown

@karthikc1125 is attempting to deploy a commit to the santanu-atta03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@karthikc1125

Copy link
Copy Markdown
Contributor Author

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates route-level layout behavior to prevent multiple navigation bars from rendering simultaneously and to ensure page content doesn’t sit underneath the fixed global navbar. It also includes some Backend configuration cleanup/changes that should be reflected in the PR scope.

Changes:

  • Conditionally render the global <Navbar /> in App.jsx based on the current route to avoid “double navbar” overlap.
  • Add consistent top padding (e.g., pt-32) on several pages that use the fixed global navbar so content starts below it.
  • Refactor/format several page/component files and adjust Backend DB/OAuth callback configuration.

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Frontend/src/App.jsx Adds route-based navbar visibility logic and conditionally renders <Navbar />.
Frontend/src/components/Navbar.jsx Minor formatting changes to className template strings.
Frontend/src/pages/Results.jsx Adds pt-32 top padding to avoid content being hidden under the fixed navbar; formatting tweaks.
Frontend/src/pages/Analytics.jsx Adds pt-32 top padding for navbar offset.
Frontend/src/pages/AdvancedFeaturesDashboard.jsx Adds pt-32 top padding; minor formatting tweaks.
Frontend/src/pages/PracticeLab.jsx Adds pt-32 top padding; minor formatting in empty catch blocks.
Frontend/src/components/Blogs/BlogPlatform.jsx Adds pt-32 top padding; formatting/indentation cleanup.
Frontend/src/pages/Leaderboard.jsx Adds large top padding (pt-[25vh]) and formatting tweaks.
Frontend/src/pages/Landing.jsx Removes leading BOM/indentation on the first import line.
Frontend/src/pages/Terms.jsx Formatting/indentation cleanup (page still has its own navbar).
Frontend/src/pages/Privacy.jsx Formatting/indentation cleanup (page still has its own navbar).
Frontend/src/pages/CookiePolicy.jsx Formatting/indentation cleanup (page still has its own navbar).
Backend/config/db.js Simplifies DB connect logic; removes in-memory fallback code.
Backend/config/Passport.js Changes OAuth callback URLs to relative paths.
Backend/routes/User.route.js Removes large commented-out OAuth/cookie code blocks (no functional change intended).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Frontend/src/App.jsx
Comment thread Backend/config/db.js
Comment thread Frontend/src/pages/Leaderboard.jsx
Comment thread Frontend/src/App.jsx
@lokeshjakhar7781 lokeshjakhar7781 added the ECWoC26 Required for ECWoC26 scoring label Feb 20, 2026
@santanu-atta03
santanu-atta03 merged commit 60ad16a into santanu-atta03:main Feb 20, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECWoC26-L2 ECWoC26 Required for ECWoC26 scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants