Skip to content

Commit 4f95120

Browse files
committed
made coming soon links unclickable on map
1 parent 625dbc7 commit 4f95120

File tree

1 file changed

+18
-12
lines changed
  • src/pages/Anywhere/AnywhereMap/MapChart

1 file changed

+18
-12
lines changed

src/pages/Anywhere/AnywhereMap/MapChart/index.jsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,25 @@ const MapChart = () => {
4646
countryData && countryData.url.includes("coming-soon");
4747

4848
if (countryData) {
49-
// For target countries, add Tippy tooltip and click handler
50-
return (
51-
<Tippy key={geo.rsmKey} content={countryData.message}>
52-
<Link to={countryData.url}>
53-
<Geography
54-
geography={geo}
55-
style={comingSoon ? comingSoonStyle : liveStyle}
56-
/>
57-
</Link>
58-
</Tippy>
59-
);
49+
if (!comingSoon) {
50+
// TARGET COUNTRIES
51+
return (
52+
<Tippy key={geo.rsmKey} content={countryData.message}>
53+
<Link to={countryData.url}>
54+
<Geography geography={geo} style={liveStyle} />
55+
</Link>
56+
</Tippy>
57+
);
58+
} else {
59+
// COMING SOON COUNTRIES
60+
return (
61+
<Tippy key={geo.rsmKey} content={countryData.message}>
62+
<Geography geography={geo} style={comingSoonStyle} />
63+
</Tippy>
64+
);
65+
}
6066
} else {
61-
// Render non-target countries without Tippy and without click handler
67+
// NON TARGET COUNTRIES
6268
return (
6369
<Geography
6470
key={geo.rsmKey}

0 commit comments

Comments
 (0)