Skip to content

Commit

Permalink
Merge pull request #201 from deriv-com/shayan/fix-platform-switcher-o…
Browse files Browse the repository at this point in the history
…verlay-issue

fix: added conditional rendering for overlay element
  • Loading branch information
shayan-deriv authored May 20, 2024
2 parents 6d55581 + 4a9b4e3 commit 29f2f9e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/components/AppLayout/PlatformSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
useState,
JSX,
} from "react";
import clsx from "clsx";
import { useOnClickOutside } from "usehooks-ts";
import { PlatformSwitcherButton } from "./PlatformSwitcherButton";
import { ContextMenu } from "../../ContextMenu";
Expand Down Expand Up @@ -67,11 +66,7 @@ export const PlatformSwitcher = ({
}}
{...buttonProps}
/>
<div
className={clsx("deriv-platform-switcher__overlay", {
"deriv-platform-switcher__overlay-fadeout": !isExpanded,
})}
/>
{isExpanded && <div className="deriv-platform-switcher__overlay" />}
<ContextMenu
ref={ref}
className="deriv-platform-switcher__context-menu"
Expand Down

0 comments on commit 29f2f9e

Please sign in to comment.