Skip to content

Feat/UI improvement mini navbar#405

Open
DevaanshKathuria wants to merge 2 commits into
c2siorg:developfrom
DevaanshKathuria:feat/ui-improvement-miniNavbar
Open

Feat/UI improvement mini navbar#405
DevaanshKathuria wants to merge 2 commits into
c2siorg:developfrom
DevaanshKathuria:feat/ui-improvement-miniNavbar

Conversation

@DevaanshKathuria
Copy link
Copy Markdown

Description

Fixes three pre-existing bugs in the SideBar component group,
all related to the ongoing MUI v4 → v5 migration.

Changes

sidelist.jsx:

  • Fixed hardcoded key="menu-items" on every mapped div — every
    item was getting the same key, causing duplicate key warnings
  • Migrated from deprecated makeStyles (@mui/styles) to MUI v5
    styled() API
  • Fixed children rendering inside MenuList using React.Children.map
    to avoid Fragment warning

SideBar/index.jsx:

  • Removed Fragment wrapper (<>...</>) from return statement —
    this was causing "MUI: Menu doesn't accept Fragment as child" warning
  • Migrated from deprecated makeStyles to MUI v5 styled() API
  • Simplified conditional rendering to return single elements directly

Related Issue

Closes #314

How Has This Been Tested?

  • Ran npm run dev — no duplicate key warnings in console
  • MUI Fragment warning resolved
  • No functional regressions introduced
  • App builds and runs correctly on localhost:5173

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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.

refactor: Migrate deprecated MUI v4 components to MUI v5

1 participant