From aa84acd17a8e39eeb9af3c37bde0516fd0a42b1a Mon Sep 17 00:00:00 2001 From: Adam Iskounen Date: Mon, 11 Nov 2024 07:14:07 -0500 Subject: [PATCH 1/5] resized social icons and aligned them --- .../Auth2/scenes/LoginWelcomeStep.tsx | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx b/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx index 4f7cb54a3d0..5b8b9a1ec14 100644 --- a/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx +++ b/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx @@ -1,7 +1,10 @@ import { + AppleIcon, BackButton, Button, + FacebookIcon, Flex, + GoogleIcon, Input, LinkText, Spacer, @@ -21,7 +24,7 @@ import { osMajorVersion } from "app/utils/platformUtil" import { Formik, useFormikContext } from "formik" import { MotiView } from "moti" import React, { useRef } from "react" -import { Image, Platform } from "react-native" +import { Platform } from "react-native" import { Easing } from "react-native-reanimated" import * as Yup from "yup" @@ -225,29 +228,31 @@ const SocialLoginButtons: React.FC = () => { - + {Platform.OS === "ios" && osMajorVersion() >= 13 && ( - )} - From 82ae24e345833b1ab0e2c27cc435446e24afc348 Mon Sep 17 00:00:00 2001 From: Adam Iskounen Date: Mon, 11 Nov 2024 07:15:05 -0500 Subject: [PATCH 2/5] Finished catch-all error message --- src/app/utils/auth/socialSignInHelpers.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app/utils/auth/socialSignInHelpers.ts b/src/app/utils/auth/socialSignInHelpers.ts index 318b2e94c72..39e342116b9 100644 --- a/src/app/utils/auth/socialSignInHelpers.ts +++ b/src/app/utils/auth/socialSignInHelpers.ts @@ -108,18 +108,8 @@ export const useSocialLogin = () => { ) => { if (errorMode === "no account") { Alert.alert("No Artsy account found", error.message, [ - { - text: "Cancel", - style: "cancel", - }, { text: "OK", - onPress: () => { - // TODO: How should this be handled in auth2? - // navigation.replace(mode === "login" ? "OnboardingCreateAccount" : "OnboardingLogin", { - // withFadeAnimation: true, - // }) - }, }, ]) } else { From c906abbeaecabbc5cdb88b18da5bcd4069f46616 Mon Sep 17 00:00:00 2001 From: Adam Iskounen Date: Mon, 11 Nov 2024 07:24:19 -0500 Subject: [PATCH 3/5] added sentry event for social sign-in errors --- src/app/utils/auth/socialSignInHelpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/utils/auth/socialSignInHelpers.ts b/src/app/utils/auth/socialSignInHelpers.ts index 39e342116b9..c8c41045e75 100644 --- a/src/app/utils/auth/socialSignInHelpers.ts +++ b/src/app/utils/auth/socialSignInHelpers.ts @@ -110,6 +110,9 @@ export const useSocialLogin = () => { Alert.alert("No Artsy account found", error.message, [ { text: "OK", + onPress: () => { + captureMessage("AUTH_BLOCKED: " + error.message) + }, }, ]) } else { From 08747fd74b18b5c9e8d525739c3e915b9571f1c8 Mon Sep 17 00:00:00 2001 From: Adam Iskounen Date: Mon, 11 Nov 2024 08:38:22 -0500 Subject: [PATCH 4/5] let metaphysics determine my IP address --- .../Onboarding/Auth2/hooks/useCountryCode.tsx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/app/Scenes/Onboarding/Auth2/hooks/useCountryCode.tsx b/src/app/Scenes/Onboarding/Auth2/hooks/useCountryCode.tsx index e25c2e51eff..3241c0424b0 100644 --- a/src/app/Scenes/Onboarding/Auth2/hooks/useCountryCode.tsx +++ b/src/app/Scenes/Onboarding/Auth2/hooks/useCountryCode.tsx @@ -1,31 +1,18 @@ import { useCountryCodeQuery } from "__generated__/useCountryCodeQuery.graphql" import { useClientQuery } from "app/utils/useClientQuery" -import { useEffect, useState } from "react" -import { getIpAddress } from "react-native-device-info" import { graphql } from "react-relay" const USE_COUNTRY_CODE_QUERY = graphql` - query useCountryCodeQuery($ip: String!) { - requestLocation(ip: $ip) { + query useCountryCodeQuery { + requestLocation { countryCode } } ` export const useCountryCode = () => { - const [ip, setIp] = useState("0.0.0.0") - - useEffect(() => { - getIpAddress().then((ip) => { - setIp(ip) - }) - }, []) - const { data, loading, error } = useClientQuery({ query: USE_COUNTRY_CODE_QUERY, - variables: { - ip, - }, cacheConfig: { networkCacheConfig: { force: false, From 7fdc9ee1ca7b2bc660d61c25b6b35dc201b06129 Mon Sep 17 00:00:00 2001 From: Adam Iskounen Date: Mon, 11 Nov 2024 09:01:39 -0500 Subject: [PATCH 5/5] fixed code review suggestions --- .../Auth2/scenes/LoginWelcomeStep.tsx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx b/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx index 5b8b9a1ec14..bb5bdb3eadd 100644 --- a/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx +++ b/src/app/Scenes/Onboarding/Auth2/scenes/LoginWelcomeStep.tsx @@ -232,28 +232,19 @@ const SocialLoginButtons: React.FC = () => { {Platform.OS === "ios" && osMajorVersion() >= 13 && ( )} - -