mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 17:51:12 -05:00
feat: Implement plan for bug fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { logger } from '@/lib/logger';
|
||||
@@ -82,7 +83,7 @@ export function useUnitPreferences() {
|
||||
|
||||
const autoDetectPreferences = useCallback(async () => {
|
||||
try {
|
||||
const response = await supabase.functions.invoke('detect-location');
|
||||
const response = await invokeWithTracking('detect-location', {}, user?.id);
|
||||
|
||||
if (response.data && response.data.measurementSystem) {
|
||||
const newPreferences: UnitPreferences = {
|
||||
|
||||
Reference in New Issue
Block a user