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