From ea8d8cc71066ed30d6393ff03196e363ae6a7b8d Mon Sep 17 00:00:00 2001 From: Paul Tran-Van Date: Fri, 20 Dec 2024 09:26:33 +0100 Subject: [PATCH] fix: Do not instanciate iframe for RN env This was causing issues on flagship app --- .../cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx b/packages/cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx index 4219f4f2ff..7bbd62e14e 100644 --- a/packages/cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx +++ b/packages/cozy-dataproxy-lib/src/dataproxy/DataProxyProvider.jsx @@ -2,6 +2,7 @@ import * as Comlink from 'comlink' import React, { useContext, useState, useEffect } from 'react' import { useClient } from 'cozy-client' +import { isFlagshipApp } from 'cozy-device-helper' import flag from 'cozy-flags' import Minilog from 'cozy-minilog' @@ -66,7 +67,11 @@ export const DataProxyProvider = React.memo(({ children }) => { } } - initIframe() + if (isFlagshipApp()) { + setDataProxyServicesAvailable(false) + } else { + initIframe() + } }, [client]) const onIframeLoaded = () => {