Skip to content

Commit

Permalink
Corrected unused variables and removed filter org logic
Browse files Browse the repository at this point in the history
  • Loading branch information
chrtorres committed Mar 18, 2024
1 parent dd36b9c commit d23c659
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const Root = styled('div')(({ theme }) => ({

[`.${classes.mobileNav}`]: {
padding: `${theme.spacing(2)} ${theme.spacing()}px`
}
},

Check failure on line 104 in frontend/src/components/Header.tsx

View workflow job for this annotation

GitHub Actions / lint

Delete `,`
}));

const GLOBAL_ADMIN = 2;
Expand Down Expand Up @@ -230,45 +230,45 @@ const HeaderNoCtx: React.FC<ContextType> = (props) => {
return (
<Root>
<AppBar position="static" elevation={0}>
{/* <div className={classes.inner}> */}
<Toolbar>
<Link to="/">
<img
src={logo}
className={classes.logo}
alt="Crossfeed Icon Navigate Home"
/>
</Link>
<div className={classes.lgNav}>{desktopNavItems.slice()}</div>
<div className={classes.spacing} />

{userLevel > 0 && (
<>
<SearchBar
initialValue={searchTerm}
value={searchTerm}
onChange={(value) => {
if (location.pathname !== '/inventory')
history.push('/inventory?q=' + value);
setSearchTerm(value, {
shouldClearFilters: false,
autocompleteResults: false
});
}}
<div className={classes.inner}>
<Toolbar>
<Link to="/">
<img
src={logo}
className={classes.logo}
alt="Crossfeed Icon Navigate Home"
/>
<IconButton
edge="start"
className={classes.menuButton}
aria-label="toggle mobile menu"
color="inherit"
onClick={() => setNavOpen((open) => !open)}
>
<MenuIcon />
</IconButton>
</>
)}
</Toolbar>
{/* </div> */}
</Link>
<div className={classes.lgNav}>{desktopNavItems.slice()}</div>
<div className={classes.spacing} />

{userLevel > 0 && (
<>
<SearchBar
initialValue={searchTerm}
value={searchTerm}
onChange={(value) => {
if (location.pathname !== '/inventory')
history.push('/inventory?q=' + value);
setSearchTerm(value, {
shouldClearFilters: false,
autocompleteResults: false
});
}}
/>
<IconButton
edge="start"
className={classes.menuButton}
aria-label="toggle mobile menu"
color="inherit"
onClick={() => setNavOpen((open) => !open)}
>
<MenuIcon />
</IconButton>
</>
)}
</Toolbar>
</div>
</AppBar>
<Drawer
anchor="right"
Expand Down

0 comments on commit d23c659

Please sign in to comment.