feat: add rental history dashboard for investors and update navigation menu
This commit is contained in:
@@ -67,6 +67,7 @@ const bikerNavItems = [
|
||||
const investorNavItems = [
|
||||
{ label: 'Dashboard', href: '/investor', icon: BarChart3 },
|
||||
{ label: 'My Investments', href: '/investor/plans', icon: Target },
|
||||
{ label: 'Rental History', href: '/investor/rental-history', icon: FileText },
|
||||
{ label: 'Withdraw', href: '/investor/withdraw', icon: CreditCard },
|
||||
{ label: 'My Profile', href: '/investor/profile', icon: User },
|
||||
];
|
||||
@@ -106,7 +107,9 @@ export default function Sidebar() {
|
||||
] : isInvestor ? [
|
||||
{ label: 'Home', href: '/investor', icon: BarChart3 },
|
||||
{ label: 'Investments', href: '/investor/plans', icon: Target },
|
||||
{ label: 'History', href: '/investor/rental-history', icon: FileText },
|
||||
{ label: 'Withdraw', href: '/investor/withdraw', icon: CreditCard },
|
||||
{ label: 'Profile', href: '/investor/profile', icon: User },
|
||||
] : isShop ? [
|
||||
{ label: 'Home', href: '/shop', icon: Store },
|
||||
{ label: 'Deliveries', href: '/shop/deliveries', icon: Truck },
|
||||
@@ -194,8 +197,8 @@ export default function Sidebar() {
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
{/* Bottom Navigation for Mobile */}
|
||||
<nav className="lg:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-slate-200 flex justify-around items-center h-16 z-30 pb-safe shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.05)]">
|
||||
{/* Bottom Navigation for Mobile */}
|
||||
<nav className="lg:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-slate-200 flex items-center h-16 z-30 shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.05)]">
|
||||
{bottomNavItems.map((item) => {
|
||||
const isActive = pathname === item.href || (item.href !== '/' && pathname.startsWith(item.href));
|
||||
const Icon = item.icon;
|
||||
@@ -204,7 +207,7 @@ export default function Sidebar() {
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className={`
|
||||
flex flex-col items-center justify-center w-full h-full gap-1 transition-colors
|
||||
flex flex-col items-center justify-center flex-1 h-full gap-1 transition-colors
|
||||
${isActive ? 'text-accent' : 'text-slate-500 hover:text-slate-900'}
|
||||
`}
|
||||
>
|
||||
@@ -213,13 +216,15 @@ export default function Sidebar() {
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
<button
|
||||
onClick={() => setMobileOpen(true)}
|
||||
className="flex flex-col items-center justify-center w-full h-full gap-1 text-slate-500 hover:text-slate-900 transition-colors"
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
<span className="text-[10px] font-medium">Menu</span>
|
||||
</button>
|
||||
{isAdmin && (
|
||||
<button
|
||||
onClick={() => setMobileOpen(true)}
|
||||
className="flex flex-col items-center justify-center flex-1 h-full gap-1 text-slate-500 hover:text-slate-900 transition-colors"
|
||||
>
|
||||
<Menu className="w-5 h-5" />
|
||||
<span className="text-[10px] font-medium">Menu</span>
|
||||
</button>
|
||||
)}
|
||||
</nav>
|
||||
|
||||
{mobileOpen && (
|
||||
|
||||
Reference in New Issue
Block a user