Skip to content

Commit cba1a9d

Browse files
authored
Merge pull request #274 from FromDoppler/doi-2344-hide-menu-send-rfm-ready
Do not use hidenavbar function, send rfm ready
2 parents f9555f9 + 9046acc commit cba1a9d

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/components/Rfm/index.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { useUpdateRfmSettings } from "../../queries/doppler-legacy-queries";
55
import { useGetIntegrationStatus } from "../../queries/integrations-api-queries";
66
import Button from "../ui/Button";
77
import { LoadingScreen } from "../application";
8-
import { hideNavBar } from "../../utils";
9-
10-
hideNavBar();
118

129
export const RFM = ({ integration, idThirdPartyApp }) => {
1310
const intl = useIntl();
@@ -28,6 +25,11 @@ export const RFM = ({ integration, idThirdPartyApp }) => {
2825
period: 120,
2926
});
3027

28+
useEffect(() => {
29+
window.displayDopplerNavBar(false);
30+
window.parent.postMessage({ type: "rfmReady" }, "*");
31+
}, []);
32+
3133
const { mutate: updateRfmSettings, isLoading: updatingMutation } =
3234
useUpdateRfmSettings();
3335

src/utils/index.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,3 @@ export const sanitizeDateStringToIsoFormat = (dateString: string) => {
7878

7979
export const capitalize = (text: string): string =>
8080
text ? text.charAt(0).toUpperCase() + text.slice(1) : "";
81-
82-
export function hideNavBar(): void {
83-
const intervalId = setInterval(() => {
84-
if (window.displayDopplerNavBar) {
85-
window.displayDopplerNavBar(false);
86-
clearInterval(intervalId);
87-
}
88-
}, 50);
89-
}

0 commit comments

Comments
 (0)