Skip to content

Commit

Permalink
fix: guest hide logOut btn
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 committed May 18, 2023
1 parent 1120937 commit bfbdd05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/storefront/src/components/layout/B3Mainheader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function B3Mainheader({ title }: { title: string }) {
{+role === 3 &&
(companyInfo?.companyName || salesRepCompanyName || 'Super admin')}
</Box>
<B3AccountInfo />
{role !== 100 && <B3AccountInfo />}
</Box>
{title && (
<Box
Expand Down
6 changes: 4 additions & 2 deletions apps/storefront/src/components/layout/B3MobileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function B3MobileLayout({
}

const {
state: { companyInfo, salesRepCompanyName, isAgenting },
state: { companyInfo, salesRepCompanyName, isAgenting, role },
} = useContext(GlobaledContext)

return (
Expand Down Expand Up @@ -119,7 +119,9 @@ export default function B3MobileLayout({
left: 0,
}}
>
<B3AccountInfo closeSidebar={setOpenMobileSidebar} />
{role !== 100 && (
<B3AccountInfo closeSidebar={setOpenMobileSidebar} />
)}
</Box>
</Box>
)}
Expand Down

0 comments on commit bfbdd05

Please sign in to comment.