added the elmeent on the nav and fixed the payments transactions

This commit is contained in:
mouazkh
2026-06-23 23:32:07 +03:00
parent 61e527fab3
commit 199478f237
8 changed files with 958 additions and 33 deletions

View File

@ -78,7 +78,7 @@ export default function ClientLayout({ children }) {
name: authUser.name || authUser.email,
email: authUser.email,
phone: authUser.phone,
role: AuthService.isOwner() ? UserRole.OWNER : UserRole.CUSTOMER,
role: AuthService.isOwner() ? UserRole.OWNER : AuthService.isAgent() ? UserRole.AGENT : UserRole.CUSTOMER,
});
} else {
setUser(null);
@ -135,6 +135,8 @@ export default function ClientLayout({ children }) {
const isProfilePage = pathname === "/profile";
const isOwner = user?.role === UserRole.OWNER;
const isAgent = user?.role === UserRole.AGENT;
const isOwnerOrAgent = isOwner || isAgent;
const isCustomer = user?.role === UserRole.CUSTOMER;
const isAuthenticated = !!user;
@ -718,7 +720,7 @@ export default function ClientLayout({ children }) {
</main>
{isAuthenticated && !isAuthPage && (
<BottomNav isOwner={isOwner} />
<BottomNav isOwner={isOwner} isOwnerOrAgent={isOwnerOrAgent} />
)}
</FavoritesProvider>
</NotificationsProvider>