File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
packages/webapp/components/onboarding Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -213,19 +213,18 @@ export const OnboardingV2 = (): ReactElement => {
213213 const { onEnablePush } = usePushNotificationMutation ( ) ;
214214 const isLaptop = useViewSize ( ViewSize . Laptop ) ;
215215 const isNativeApp = isIOSNative ( ) || ! ! isAndroidApp ;
216- const isIOSDevice = isIOS ( ) ;
217- const isAndroidDevice =
218- typeof navigator !== 'undefined' && / a n d r o i d / i. test ( navigator . userAgent ) ;
219- const getMobileStoreUrl = ( ) => {
220- if ( isIOSDevice ) {
216+ const mobileStoreUrl = useMemo ( ( ) => {
217+ if ( isIOS ( ) ) {
221218 return appStoreUrl ;
222219 }
223- if ( isAndroidDevice ) {
220+ if (
221+ typeof navigator !== 'undefined' &&
222+ / a n d r o i d / i. test ( navigator . userAgent )
223+ ) {
224224 return playStoreUrl ;
225225 }
226226 return null ;
227- } ;
228- const mobileStoreUrl = getMobileStoreUrl ( ) ;
227+ } , [ ] ) ;
229228 const showExtensionCta = isLaptop && ! isNativeApp ;
230229 const showMobileAppCta = ! isNativeApp ;
231230 const [ showMobileAppPopup , setShowMobileAppPopup ] = useState ( false ) ;
You can’t perform that action at this time.
0 commit comments