Merge branch 'develop' into 'main'
AW-429-comp-v1-ios-ab See merge request witapp/aura-webapp!724
This commit is contained in:
commit
7f349a5b01
@ -82,18 +82,18 @@ function AndroidCamera() {
|
||||
}
|
||||
|
||||
const handleRequestCameraModalAllow = () => {
|
||||
if (isInstagramAndroid) {
|
||||
return handleToScanHand()
|
||||
}
|
||||
// if (isInstagramAndroid) {
|
||||
// return handleToScanHand()
|
||||
// }
|
||||
setIsCameraModalOpen(true)
|
||||
setIsRequestCameraModalOpen(false)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (!isShowCameraRequestModal) {
|
||||
if (isInstagramAndroid) {
|
||||
return handleToScanHand()
|
||||
}
|
||||
// if (isInstagramAndroid) {
|
||||
// return handleToScanHand()
|
||||
// }
|
||||
setIsCameraModalOpen(true)
|
||||
}
|
||||
}, [isShowCameraRequestModal])
|
||||
@ -317,9 +317,9 @@ function AndroidCamera() {
|
||||
<span>{translate("/camera.no_access_camera")}</span>
|
||||
<div className={styles["toast-buttons-container"]}>
|
||||
<button onClick={() => {
|
||||
if (isInstagramAndroid) {
|
||||
return handleToScanHand()
|
||||
}
|
||||
// if (isInstagramAndroid) {
|
||||
// return handleToScanHand()
|
||||
// }
|
||||
setToastVisible(null)
|
||||
setIsCameraModalOpen(true)
|
||||
}}>
|
||||
|
||||
@ -19,7 +19,7 @@ import { EUnleashFlags, useUnleash } from "@/hooks/ab/unleash/useUnleash";
|
||||
import GenderV0 from "./variants/GenderV0";
|
||||
import GenderV1 from "./variants/GenderV1";
|
||||
import GenderV2 from "./variants/GenderV2";
|
||||
import { instagramToBrowser } from "@/services/hacks/insta-to-browser";
|
||||
import { webviewToSystemBrowser } from "@/services/hacks/webviewToSystemBrowser";
|
||||
|
||||
function GenderPage() {
|
||||
const { translate } = useTranslations(ELocalesPlacement.CompatibilityV2);
|
||||
@ -103,7 +103,7 @@ function GenderPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (privacyPolicyChecked && gender && isSelected) {
|
||||
instagramToBrowser(["android"]);
|
||||
webviewToSystemBrowser(["android"]);
|
||||
handleNext();
|
||||
}
|
||||
}, [gender, handleNext, isSelected, privacyPolicyChecked]);
|
||||
|
||||
@ -19,7 +19,7 @@ import { EGender, ESourceAuthorization } from "@/api/resources/User";
|
||||
import AlreadyHaveAccount from "@/components/ui/AlreadyHaveAccount";
|
||||
import Answer from "../../components/Answer";
|
||||
import Loader, { LoaderColor } from "@/components/Loader";
|
||||
import { instagramToBrowser } from "@/services/hacks/insta-to-browser";
|
||||
import { webviewToSystemBrowser } from "@/services/hacks/webviewToSystemBrowser";
|
||||
|
||||
function GenderPage() {
|
||||
const { translate } = useTranslations(ELocalesPlacement.CompatibilityV3);
|
||||
@ -96,7 +96,7 @@ function GenderPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (privacyPolicyChecked && gender && isSelected) {
|
||||
instagramToBrowser(["android"]);
|
||||
webviewToSystemBrowser(["android"]);
|
||||
handleNext();
|
||||
}
|
||||
}, [gender, handleNext, isSelected, privacyPolicyChecked]);
|
||||
|
||||
@ -17,7 +17,7 @@ import Loader, { LoaderColor } from "@/components/Loader";
|
||||
import GenderV0 from "./variants/GenderV0";
|
||||
import GenderV1 from "./variants/GenderV1";
|
||||
import GenderV2 from "./variants/GenderV2";
|
||||
import { instagramToBrowser } from "@/services/hacks/insta-to-browser";
|
||||
import { webviewToSystemBrowser } from "@/services/hacks/webviewToSystemBrowser";
|
||||
|
||||
function GenderPage() {
|
||||
const { translate } = useTranslations(ELocalesPlacement.CompatibilityV4);
|
||||
@ -94,7 +94,7 @@ function GenderPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (privacyPolicyChecked && gender && isSelected) {
|
||||
instagramToBrowser(["android"]);
|
||||
webviewToSystemBrowser(["android"]);
|
||||
handleNext();
|
||||
}
|
||||
}, [gender, handleNext, isSelected, privacyPolicyChecked]);
|
||||
|
||||
@ -18,7 +18,7 @@ import { useSession } from "@/hooks/session/useSession";
|
||||
import { EGender, ESourceAuthorization } from "@/api/resources/User";
|
||||
import AlreadyHaveAccount from "@/components/ui/AlreadyHaveAccount";
|
||||
import Answer from "../../components/Answer";
|
||||
import { instagramToBrowser } from "@/services/hacks/insta-to-browser";
|
||||
import { webviewToSystemBrowser } from "@/services/hacks/webviewToSystemBrowser";
|
||||
|
||||
function GenderPalmistry() {
|
||||
const { translate } = useTranslations(ELocalesPlacement.PalmistryV1);
|
||||
@ -84,7 +84,7 @@ function GenderPalmistry() {
|
||||
|
||||
useEffect(() => {
|
||||
if (privacyPolicyChecked && gender && isSelected) {
|
||||
instagramToBrowser(["android"]);
|
||||
webviewToSystemBrowser(["android"]);
|
||||
handleNext();
|
||||
}
|
||||
}, [gender, handleNext, isSelected, privacyPolicyChecked]);
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
export const instagramToBrowser = (includeSystems: Array<"android" | "ios">) => {
|
||||
export const webviewToSystemBrowser = (includeSystems: Array<"android" | "ios">) => {
|
||||
const ua = window.navigator.userAgent;
|
||||
if (
|
||||
ua.includes("Instagram")
|
||||
ua.includes("Instagram") ||
|
||||
ua.includes("FBAN") ||
|
||||
ua.includes("FBAV")
|
||||
) {
|
||||
if (includeSystems.includes("ios") && /iPad|iPhone|iPod/.test(ua)) {
|
||||
window.location.href = "x-safari-" + window.location.href;
|
||||
Loading…
Reference in New Issue
Block a user