From 306f16263905eb8bca4463b735b5987aeb3cc5d1 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Fri, 12 Jul 2024 07:37:43 -0700
Subject: Make all referrer info sync (#4782)

---
 src/Navigation.tsx | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

(limited to 'src/Navigation.tsx')

diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 8c815a3fe..9e9b49443 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -771,15 +771,14 @@ function logModuleInitTime() {
   })
 
   if (isWeb) {
-    Referrer.getReferrerInfoAsync().then(info => {
-      if (info && info.hostname !== 'bsky.app') {
-        logEvent('deepLink:referrerReceived', {
-          to: window.location.href,
-          referrer: info?.referrer,
-          hostname: info?.hostname,
-        })
-      }
-    })
+    const referrerInfo = Referrer.getReferrerInfo()
+    if (referrerInfo && referrerInfo.hostname !== 'bsky.app') {
+      logEvent('deepLink:referrerReceived', {
+        to: window.location.href,
+        referrer: referrerInfo?.referrer,
+        hostname: referrerInfo?.hostname,
+      })
+    }
   }
 
   if (__DEV__) {
-- 
cgit 1.4.1

