Skip to content

Commit

Permalink
Merge pull request #217 from wwWallet/hide-mobile-nav-items
Browse files Browse the repository at this point in the history
Simplify Mobile UI: Remove Duplicate Nav Items
  • Loading branch information
gkatrakazas authored Apr 3, 2024
2 parents 7efe9f0 + 6c141ef commit 6711ac5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
42 changes: 25 additions & 17 deletions src/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const NavItem = ({
return (
<li
onClick={() => handleNavigate(path)}
className={`cursor-pointer flex items-center space-x-2 mb-4 p-2 rounded-r-xl ${location.pathname === path ? 'min481:bg-white min481:text-custom-blue' : 'nav-item-animate-hover'}`}
className={`cursor-pointer flex items-center space-x-2 mb-4 p-2 rounded-r-xl ${location.pathname === path ? 'bg-white text-custom-blue' : 'nav-item-animate-hover'}`}
>
{children}
</li>
Expand Down Expand Up @@ -108,22 +108,30 @@ const Sidebar = ({ isOpen, toggle }) => {
<hr className="my-4 border-t border-white/20" />

{/* Nav Menu */}
<NavItem path="/" location={location} handleNavigate={handleNavigate}>
<FaWallet size={30} />
<span>{t("common.navItemCredentials")}</span>
</NavItem>
<NavItem path="/history" location={location} handleNavigate={handleNavigate}>
<IoIosTime size={30} />
<span>{t("common.navItemHistory")}</span>
</NavItem>
<NavItem path="/add" location={location} handleNavigate={handleNavigate}>
<IoIosAddCircle size={30} />
<span>{t("common.navItemAddCredentials")}</span>
</NavItem>
<NavItem path="/send" location={location} handleNavigate={handleNavigate}>
<IoIosSend size={30} />
<span>{t("common.navItemSendCredentials")}</span>
</NavItem>
<div className='max480:hidden'>
<NavItem path="/" location={location} handleNavigate={handleNavigate}>
<FaWallet size={30} />
<span>{t("common.navItemCredentials")}</span>
</NavItem>
</div>
<div className='max480:hidden'>
<NavItem path="/history" location={location} handleNavigate={handleNavigate}>
<IoIosTime size={30} />
<span>{t("common.navItemHistory")}</span>
</NavItem>
</div>
<div className='max480:hidden'>
<NavItem path="/add" location={location} handleNavigate={handleNavigate}>
<IoIosAddCircle size={30} />
<span>{t("common.navItemAddCredentials")}</span>
</NavItem>
</div>
<div className='max480:hidden'>
<NavItem path="/send" location={location} handleNavigate={handleNavigate}>
<IoIosSend size={30} />
<span>{t("common.navItemSendCredentials")}</span>
</NavItem>
</div>
<NavItem path="/settings" location={location} handleNavigate={handleNavigate}>
<IoMdSettings size={30} />
<span>{t("common.navItemSettings")}</span>
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = {
},
screens: {
'max480': { 'max': '480px' },
'min481': { 'min': '481px' },
}
},
},
Expand Down

0 comments on commit 6711ac5

Please sign in to comment.