From 8b22fc18d3cffb2f7eee4401894525b190527542 Mon Sep 17 00:00:00 2001 From: Alexandre Hajjar Date: Mon, 21 Jun 2021 18:18:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20navigator=20share=20un-han?= =?UTF-8?q?dled=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes MON-ENTREPRISEFR-T --- .../source/components/ShareSimulationBanner.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mon-entreprise/source/components/ShareSimulationBanner.tsx b/mon-entreprise/source/components/ShareSimulationBanner.tsx index 3f05cec91..a35456d1e 100644 --- a/mon-entreprise/source/components/ShareSimulationBanner.tsx +++ b/mon-entreprise/source/components/ShareSimulationBanner.tsx @@ -26,10 +26,10 @@ export default function ShareSimulationBanner() { searchParams.toString(), ].join('') - const startSharing = () => { + const startSharing = async () => { if (shareAPIAvailable) { try { - window.navigator.share({ + await window.navigator.share({ title: document.title, text: t( 'shareSimulation.navigatorShare', @@ -73,14 +73,14 @@ export default function ShareSimulationBanner() { Pour partager cette simulation :{' '} { + onClick={async () => { tracker.click.set({ chapter1: 'feature:partage', type: 'action', name: 'démarré', }) tracker.dispatch() - startSharing() + await startSharing() }} > Générer un lien dédié