Skip to content

Commit 0f1aebb

Browse files
committed
Hide google play button when coming from iOS
1 parent c3d1164 commit 0f1aebb

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/pages/LearnMore/LearnMore.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ import Footer from '../../components/Footer';
44
import Header from '../../components/Header';
55

66
const LearnMore: React.FC = () => {
7+
const [isIOS, setIsIOS] = React.useState(false);
8+
79
React.useEffect(() => {
810
window.scrollTo(0, 0);
11+
12+
// Detect iOS
13+
const userAgent = window.navigator.userAgent.toLowerCase();
14+
const isIOSDevice = /iphone|ipad|ipod/.test(userAgent);
15+
setIsIOS(isIOSDevice);
916
}, []);
1017

1118
return (
@@ -132,11 +139,13 @@ const LearnMore: React.FC = () => {
132139
<p>Get the Salamander app on your phone to control your computer
133140
remotely and get notified when work is complete.</p>
134141
<div className="app-downloads">
135-
<a href="https://play.google.com/store/apps/details?id=com.commit451.salamander"
136-
className="app-store-link" target="_blank" rel="noopener noreferrer">
137-
<img src="images/play_store.png" alt="Get it on Google Play"
138-
className="app-store-badge"/>
139-
</a>
142+
{!isIOS && (
143+
<a href="https://play.google.com/store/apps/details?id=com.commit451.salamander"
144+
className="app-store-link" target="_blank" rel="noopener noreferrer">
145+
<img src="images/play_store.png" alt="Get it on Google Play"
146+
className="app-store-badge"/>
147+
</a>
148+
)}
140149
<a href="https://apps.apple.com" className="app-store-link" target="_blank"
141150
rel="noopener noreferrer">
142151
<img src="images/app_store.svg" alt="Download on the App Store"

0 commit comments

Comments
 (0)