From 7624890ffc0ad40d22eaceee2c9e7ec1d45b8271 Mon Sep 17 00:00:00 2001 From: Natalie Bridgers Date: Fri, 10 Apr 2026 15:07:31 -0500 Subject: [PATCH] requested fixes :) --- js/app/components/get-apps.tsx | 17 ++---------- js/app/components/mobile-app-banner.tsx | 37 ++++++++----------------- js/app/constants/store-urls.ts | 9 ++++++ js/app/hooks/usePlatform.native.tsx | 3 ++ js/app/hooks/usePlatform.shared.tsx | 7 +++++ js/app/hooks/usePlatform.tsx | 3 ++ 6 files changed, 36 insertions(+), 40 deletions(-) create mode 100644 js/app/constants/store-urls.ts diff --git a/js/app/components/get-apps.tsx b/js/app/components/get-apps.tsx index 79dadd7c5..313bbd60d 100644 --- a/js/app/components/get-apps.tsx +++ b/js/app/components/get-apps.tsx @@ -1,3 +1,4 @@ +import { STORE_URLS } from "constants/store-urls"; import { Image } from "expo-image"; import { Linking, TouchableOpacity, View } from "react-native"; @@ -8,25 +9,13 @@ const HEIGHT = 200 / RATIO; export default function GetApps() { return ( - - Linking.openURL( - "https://apps.apple.com/us/app/streamplace/id6535653195", - ) - } - > + Linking.openURL(STORE_URLS.ios)}> - - Linking.openURL( - "https://play.google.com/store/apps/details?id=tv.aquareum", - ) - } - > + Linking.openURL(STORE_URLS.android)}> { try { @@ -51,9 +30,13 @@ export function MobileAppBanner() { }); const insets = useSafeAreaInsets(); - const mobilePlatform = getMobilePlatform(); + const platform = usePlatform(); - if (dismissed || !mobilePlatform) return null; + if ( + dismissed || + !((platform.isWebIOS && !platform.isMobileSafari) || platform.isWebAndroid) + ) + return null; const dismiss = () => { try { @@ -62,6 +45,8 @@ export function MobileAppBanner() { setDismissed(true); }; + const mobilePlatform = platform.isWebIOS ? "ios" : "android"; + return ( number; }; diff --git a/js/app/hooks/usePlatform.tsx b/js/app/hooks/usePlatform.tsx index d92f4366d..44b39e6cc 100644 --- a/js/app/hooks/usePlatform.tsx +++ b/js/app/hooks/usePlatform.tsx @@ -25,10 +25,13 @@ export default function usePlatform(): IsPlatform { isIOS: false, isAndroid: false, isWeb: true, + isWebAndroid: /Android/.test(ua), + isWebIOS: /iPhone|iPad|iPod/.test(ua), isElectron: electron, isBrowser: !electron, isSafari: ua.browser.name.includes("Safari"), isFirefox: ua.browser.name === "Firefox", isChrome: ua.browser.name === "Chrome", + isMobileSafari: /Safari/.test(ua) && !/CriOS|FxiOS|EdgiOS/.test(ua), }; } -- 2.51.2