Skip to content

Commit

Permalink
feat!: hide profile and account button
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood authored and Faraz32123 committed Jun 4, 2024
1 parent d4ea0b7 commit 3378d1c
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/learning-header/AuthenticatedUserDropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ const AuthenticatedUserDropdown = ({ intl, username, userProfileImage }) => {
</Dropdown.Toggle>
<Dropdown.Menu className="dropdown-menu-right">
{dashboardMenuItem}
<Dropdown.Item href={`${getConfig().ACCOUNT_PROFILE_URL}/u/${username}`}>
<span className="drop-icon"><ProfileIcon className="text-primary" /></span>
{intl.formatMessage(messages.profile)}
</Dropdown.Item>
<Dropdown.Item href={getConfig().ACCOUNT_SETTINGS_URL}>
<span className="drop-icon"><AccountIcon className="text-primary" /></span>
{intl.formatMessage(messages.account)}
</Dropdown.Item>
{ getConfig().ORDER_HISTORY_URL && (
{getConfig().ENABLE_PROFILE_BUTTON && (
<Dropdown.Item href={`${getConfig().ACCOUNT_PROFILE_URL}/u/${username}`}>
<span className="drop-icon"><ProfileIcon className="text-primary" /></span>
{intl.formatMessage(messages.profile)}
</Dropdown.Item>
)}
{getConfig().ENABLE_ACCOUNT_BUTTON && (
<Dropdown.Item href={getConfig().ACCOUNT_SETTINGS_URL}>
<span className="drop-icon"><AccountIcon className="text-primary" /></span>
{intl.formatMessage(messages.account)}
</Dropdown.Item>
)}
{getConfig().ORDER_HISTORY_URL && (
<Dropdown.Item href={getConfig().ORDER_HISTORY_URL}>
{intl.formatMessage(messages.orderHistory)}
</Dropdown.Item>
Expand Down

0 comments on commit 3378d1c

Please sign in to comment.