Skip to content

feat(#2): integrate Sidebar into dashboard layout#5

Merged
DeFiVC merged 3 commits into
ChainLearnOfficial:mainfrom
OpenSourceCOntr:feat/issue-2-integrate-sidebar
Jun 24, 2026
Merged

feat(#2): integrate Sidebar into dashboard layout#5
DeFiVC merged 3 commits into
ChainLearnOfficial:mainfrom
OpenSourceCOntr:feat/issue-2-integrate-sidebar

Conversation

@Uchechukwu-Ekezie

Copy link
Copy Markdown
Contributor

Closes #2

What changed

src/app/layout.tsx

  • Imported Sidebar from @/components/layout/sidebar
  • Wrapped <main> in a <div className="flex flex-1"> container alongside <Sidebar />
  • <MobileNav /> stays outside the flex row, below the content area

Layout structure (before → after)

Before:
<div className="flex min-h-screen flex-col">
  <Header />
  <main className="flex-1">...</main>
  <MobileNav />
</div>

After:
<div className="flex min-h-screen flex-col">
  <Header />
  <div className="flex flex-1">
    <Sidebar />          ← hidden on < lg, visible on lg+
    <main className="flex-1">...</main>
  </div>
  <MobileNav />          ← visible on < lg
</div>

No changes to sidebar.tsx were needed — the existing hidden lg:flex class already handles responsive visibility.

How to verify

  1. npm run dev → open at width > 1024px — sidebar appears on the left with Dashboard, Courses, Rewards, Credentials, and Settings links
  2. Active link highlights when navigating between pages
  3. Resize to < 1024px — sidebar hides, bottom MobileNav remains

Import Sidebar in layout.tsx and wrap main content in a flex
container so the sidebar sits alongside the page content on
desktop (lg: 1024px+). MobileNav remains below the flex row
for small screens. The Sidebar's existing hidden lg:flex class
handles responsive visibility with no extra CSS needed.

Closes ChainLearnOfficial#2
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for chainlearn ready!

Name Link
🔨 Latest commit 9ee2621
🔍 Latest deploy log https://app.netlify.com/projects/chainlearn/deploys/6a3c169da3bfb200096bf237
😎 Deploy Preview https://deploy-preview-5--chainlearn.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

- Add .eslintrc.json with next/core-web-vitals (Next.js strict config)
- Add eslint@^8 and eslint-config-next@14 to devDependencies
- Update package-lock.json

@DeFiVC DeFiVC 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.

Summary

Integrates the existing Sidebar component into the root layout, implementing issue #2's target layout exactly. The diff is minimal and focused.

What's Changed

  • src/app/layout.tsx: Imports Sidebar, wraps it and <main> in a flex container (<div className="flex flex-1">), keeping <MobileNav /> below the flex row for mobile-only visibility.

  • .eslintrc.json + package.json: Adds ESLint with next/core-web-vitals config, required for the CI Lint check to pass.

  • package-lock.json: First lockfile in the repo (6,784 lines — expected for new devDependencies).

Blocking Issues

None. ✅

What's Good

  • Layout matches issue #2's target spec character-for-character
  • Sidebar component already handles responsive visibility via hidden lg:flex
  • MobileNav correctly remains outside the flex row (mobile only)
  • Clean, focused, no scope creep

Minor Nits

  • ⚠️ Lockfile additions are expected but inflate the diff — no action needed.

@DeFiVC DeFiVC merged commit e77d268 into ChainLearnOfficial:main Jun 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Sidebar component into authenticated dashboard layout

2 participants