feat: Implement plan for bug fixes

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 13:27:23 +00:00
parent 827f0f8ea5
commit ce6c9d6866
14 changed files with 94 additions and 59 deletions

View File

@@ -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 = {