Skip to content

Commit b1d4912

Browse files
committed
style (regionselector): hide arrow if power is on
1 parent cd3fedb commit b1d4912

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/RegionSelector/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ interface RegionSelectorProps {
1414
children?: ReactNode;
1515
toggle?: boolean;
1616
theme?: boolean;
17-
chevron?: boolean;
17+
showArrow?: boolean;
1818
switchComp?: boolean;
1919
switchState?: boolean;
2020
}
2121

22-
export default function RegionSelector({ regionCode, icon, title, action, children, switchComp, switchState = false, toggle = false, theme = false, chevron = true }: RegionSelectorProps) {
22+
export default function RegionSelector({ regionCode, icon, title, action, children, switchComp, switchState = false, toggle = false, theme = false, showArrow = true }: RegionSelectorProps) {
2323
return (
24-
<div className="container" onClick={action}>
24+
<div className="container" style={{ cursor: showArrow ? 'pointer' : 'not-allowed' }} onClick={action}>
2525
<div className="def">
2626
<div className="flag-icon-wrapper">
2727
<ReactCountryFlag
@@ -40,7 +40,7 @@ export default function RegionSelector({ regionCode, icon, title, action, childr
4040
<div className="children">
4141
{children}
4242
{
43-
chevron && (
43+
showArrow && (
4444
<div className={`chevron ${toggle ? 'rotated' : ''}`}>
4545
<ChevronArrow />
4646
</div>

src/pages/Home/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ const Home = () => {
285285
<RegionSelector
286286
title={allRegions?.[sRegion]?.country}
287287
regionCode={allRegions?.[sRegion]?.code}
288+
showArrow={!power}
288289
action={() => !power && navigate("/regions")}
289290
/>
290291
}

0 commit comments

Comments
 (0)