Skip to content

Commit

Permalink
fix: admin items
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 10, 2024
1 parent 1ae5fab commit 7e6a62e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/components/layout/drawer/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,24 @@ const DrawerSection = ({ category }) => {
) : category === 'settings' ? (
<SettingsMenu />
) : (
Object.keys(value).map((subItem) => (
<React.Fragment key={`${category}${subItem}`}>
{!(category === 'nests' && subItem === 'sliders') && (
<BoolToggle
// @ts-ignore
field={`filters.${
category === 'wayfarer' || category === 'admin'
? subItem
: category
}.${category === 'wayfarer' ? 'enabled' : subItem}`}
label={subItem}
/>
)}
<Extras category={category} subItem={subItem} />
</React.Fragment>
))
Object.keys(value).map((subItem) => {
const hasSubSubCategories =
category === 'wayfarer' || category === 'admin'
return (
<React.Fragment key={`${category}${subItem}`}>
{!(category === 'nests' && subItem === 'sliders') && (
<BoolToggle
// @ts-ignore
field={`filters.${
hasSubSubCategories ? subItem : category
}.${hasSubSubCategories ? 'enabled' : subItem}`}
label={subItem}
/>
)}
<Extras category={category} subItem={subItem} />
</React.Fragment>
)
})
)}
{staticUserSettings && (
<ListItemButton onClick={toggleDialog(true, category, 'options')}>
Expand Down

0 comments on commit 7e6a62e

Please sign in to comment.