about summary refs log tree commit diff
path: root/src/state/geolocation/index.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-09-05 10:25:42 -0500
committerGitHub <noreply@github.com>2025-09-05 10:25:42 -0500
commit0f089060d2596bf75f141d1d574f14952bca1066 (patch)
tree3a5c58ca581edb8ca730fa9a2acbd7160449b2a4 /src/state/geolocation/index.tsx
parent01ba0d0ed61083a6d38f76733f57736c51659338 (diff)
downloadvoidsky-0f089060d2596bf75f141d1d574f14952bca1066.tar.zst
Make logs more clear (#8991)
Diffstat (limited to 'src/state/geolocation/index.tsx')
-rw-r--r--src/state/geolocation/index.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/state/geolocation/index.tsx b/src/state/geolocation/index.tsx
index d01e3f262..8bddb23fb 100644
--- a/src/state/geolocation/index.tsx
+++ b/src/state/geolocation/index.tsx
@@ -91,11 +91,13 @@ export function GeolocationStatusProvider({
 
   const configContext = React.useMemo(() => ({config}), [config])
   const statusContext = React.useMemo(() => {
-    if (deviceGeolocation) {
-      logger.debug('geolocation: has device geolocation available')
+    if (deviceGeolocation?.countryCode) {
+      logger.debug('has device geolocation available')
     }
     const geolocation = mergeGeolocation(deviceGeolocation, config)
     const status = computeGeolocationStatus(geolocation, config)
+    // ensure this remains debug and never leaves device
+    logger.debug('result', {deviceGeolocation, geolocation, status, config})
     return {location: geolocation, status}
   }, [config, deviceGeolocation])
 
@@ -117,7 +119,7 @@ export function Provider({children}: {children: React.ReactNode}) {
 
   const handleSetDeviceGeolocation = React.useCallback(
     (location: DeviceLocation) => {
-      logger.debug('geolocation: setting device geolocation')
+      logger.debug('setting device geolocation')
       setDeviceGeolocation({
         countryCode: location.countryCode ?? undefined,
         regionCode: location.regionCode ?? undefined,