mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 06:11:11 -05:00
Fix remaining component imports
This commit is contained in:
@@ -51,12 +51,40 @@ Implemented automatic breadcrumb tracking across the application:
|
|||||||
#### API Call Tracking (NEW)
|
#### API Call Tracking (NEW)
|
||||||
- Created `src/lib/supabaseClient.ts` with automatic tracking
|
- Created `src/lib/supabaseClient.ts` with automatic tracking
|
||||||
- Wraps Supabase client with Proxy for transparent tracking
|
- Wraps Supabase client with Proxy for transparent tracking
|
||||||
|
- **CRITICAL:** All frontend code MUST import from `@/lib/supabaseClient` (not `@/integrations/supabase/client`)
|
||||||
|
- 175+ files updated to use wrapped client
|
||||||
- Tracks:
|
- Tracks:
|
||||||
- Database queries (`supabase.from('table').select()`)
|
- Database queries (`supabase.from('table').select()`)
|
||||||
- RPC calls (`supabase.rpc('function_name')`)
|
- RPC calls (`supabase.rpc('function_name')`)
|
||||||
- Storage operations (`supabase.storage.from('bucket')`)
|
- Storage operations (`supabase.storage.from('bucket')`)
|
||||||
- Automatically captures success and error status codes
|
- Automatically captures success and error status codes
|
||||||
|
|
||||||
|
### 4. Critical: Import Standardization ✅
|
||||||
|
**Status:** FIXED
|
||||||
|
|
||||||
|
Updated 175+ files across the application to use the wrapped Supabase client:
|
||||||
|
|
||||||
|
**Before:**
|
||||||
|
```typescript
|
||||||
|
import { supabase } from '@/integrations/supabase/client';
|
||||||
|
```
|
||||||
|
|
||||||
|
**After:**
|
||||||
|
```typescript
|
||||||
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
|
```
|
||||||
|
|
||||||
|
**Why This Matters:**
|
||||||
|
- The wrapped client automatically tracks all API calls as breadcrumbs
|
||||||
|
- Without this change, ZERO API breadcrumbs would be captured
|
||||||
|
- This is essential for debugging - breadcrumbs show the sequence of events leading to errors
|
||||||
|
|
||||||
|
**Exceptions (4 files that intentionally use base client):**
|
||||||
|
1. `src/integrations/supabase/client.ts` - Base client definition
|
||||||
|
2. `src/lib/supabaseClient.ts` - Creates the wrapper
|
||||||
|
3. `src/lib/errorHandler.ts` - Uses base client to avoid circular dependencies when logging errors
|
||||||
|
4. `src/lib/requestTracking.ts` - Uses base client to avoid infinite tracking loops
|
||||||
|
|
||||||
## How to Use the Enhanced System
|
## How to Use the Enhanced System
|
||||||
|
|
||||||
### 1. Handling Errors
|
### 1. Handling Errors
|
||||||
@@ -91,8 +119,8 @@ import { Button } from '@/components/ui/button';
|
|||||||
|
|
||||||
### 3. API Calls (Automatic)
|
### 3. API Calls (Automatic)
|
||||||
```typescript
|
```typescript
|
||||||
// Just use supabase normally - tracking is automatic
|
// CRITICAL: Import from @/lib/supabaseClient (NOT @/integrations/supabase/client)
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
|
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from('parks')
|
.from('parks')
|
||||||
@@ -105,6 +133,8 @@ Breadcrumbs automatically record:
|
|||||||
- Method: `SELECT`
|
- Method: `SELECT`
|
||||||
- Status: 200 or 400/500 on error
|
- Status: 200 or 400/500 on error
|
||||||
|
|
||||||
|
**Important:** Using the wrong import (`@/integrations/supabase/client`) means NO API calls will be tracked as breadcrumbs!
|
||||||
|
|
||||||
### 4. Manual Breadcrumbs (When Needed)
|
### 4. Manual Breadcrumbs (When Needed)
|
||||||
```typescript
|
```typescript
|
||||||
import { breadcrumb } from '@/lib/errorBreadcrumbs';
|
import { breadcrumb } from '@/lib/errorBreadcrumbs';
|
||||||
@@ -163,6 +193,11 @@ breadcrumb.userAction('submitted', 'ContactForm', { subject: 'Support' });
|
|||||||
- [x] Breadcrumbs captured automatically for navigation
|
- [x] Breadcrumbs captured automatically for navigation
|
||||||
- [x] Breadcrumbs captured for button clicks (when labeled)
|
- [x] Breadcrumbs captured for button clicks (when labeled)
|
||||||
- [x] API calls tracked automatically
|
- [x] API calls tracked automatically
|
||||||
|
- [x] All 175+ files updated to use wrapped client
|
||||||
|
- [x] Verified only 4 files use base client (expected exceptions)
|
||||||
|
- [ ] **Test error generated at `/test-error-logging`**
|
||||||
|
- [ ] **Verify breadcrumbs contain API calls**
|
||||||
|
- [ ] **Verify timezone and referrer fields populated**
|
||||||
- [x] Error Monitoring Dashboard displays all data
|
- [x] Error Monitoring Dashboard displays all data
|
||||||
- [x] Error Details Modal shows breadcrumbs in correct order
|
- [x] Error Details Modal shows breadcrumbs in correct order
|
||||||
- [x] Error Lookup finds errors by reference ID
|
- [x] Error Lookup finds errors by reference ID
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ import Rides from "./pages/Rides";
|
|||||||
import Search from "./pages/Search";
|
import Search from "./pages/Search";
|
||||||
import Auth from "./pages/Auth";
|
import Auth from "./pages/Auth";
|
||||||
|
|
||||||
|
// Temporary test component for error logging verification
|
||||||
|
import { TestErrorLogging } from "./test-error-logging";
|
||||||
|
|
||||||
// Detail routes (lazy-loaded)
|
// Detail routes (lazy-loaded)
|
||||||
const ParkDetail = lazy(() => import("./pages/ParkDetail"));
|
const ParkDetail = lazy(() => import("./pages/ParkDetail"));
|
||||||
const RideDetail = lazy(() => import("./pages/RideDetail"));
|
const RideDetail = lazy(() => import("./pages/RideDetail"));
|
||||||
@@ -362,6 +365,10 @@ function AppContent(): React.JSX.Element {
|
|||||||
|
|
||||||
{/* Utility routes - lazy loaded */}
|
{/* Utility routes - lazy loaded */}
|
||||||
<Route path="/force-logout" element={<ForceLogout />} />
|
<Route path="/force-logout" element={<ForceLogout />} />
|
||||||
|
|
||||||
|
{/* Temporary test route - DELETE AFTER TESTING */}
|
||||||
|
<Route path="/test-error-logging" element={<TestErrorLogging />} />
|
||||||
|
|
||||||
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
|
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
|
||||||
<Route path="*" element={<NotFound />} />
|
<Route path="*" element={<NotFound />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { handleError, handleSuccess, handleInfo, AppError, getErrorMessage } fro
|
|||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useRequireMFA } from '@/hooks/useRequireMFA';
|
import { useRequireMFA } from '@/hooks/useRequireMFA';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Smartphone, Shield, Copy, Eye, EyeOff, Trash2, AlertTriangle } from 'lucide-react';
|
import { Smartphone, Shield, Copy, Eye, EyeOff, Trash2, AlertTriangle } from 'lucide-react';
|
||||||
import { MFARemovalDialog } from './MFARemovalDialog';
|
import { MFARemovalDialog } from './MFARemovalDialog';
|
||||||
import { setStepUpRequired, getAuthMethod } from '@/lib/sessionFlags';
|
import { setStepUpRequired, getAuthMethod } from '@/lib/sessionFlags';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Label } from '@/components/ui/label';
|
|||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
import { RotateCcw } from 'lucide-react';
|
import { RotateCcw } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
||||||
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
||||||
import { FilterSection } from '@/components/filters/FilterSection';
|
import { FilterSection } from '@/components/filters/FilterSection';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { UserTopList, UserTopListItem, Park, Ride, Company } from "@/types/database";
|
import { UserTopList, UserTopListItem, Park, Ride, Company } from "@/types/database";
|
||||||
import { supabase } from "@/integrations/supabase/client";
|
import { supabase } from "@/lib/supabaseClient";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { handleError } from "@/lib/errorHandler";
|
import { handleError } from "@/lib/errorHandler";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { UserTopList, UserTopListItem } from "@/types/database";
|
import { UserTopList, UserTopListItem } from "@/types/database";
|
||||||
import { supabase } from "@/integrations/supabase/client";
|
import { supabase } from "@/lib/supabaseClient";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { supabase } from "@/integrations/supabase/client";
|
import { supabase } from "@/lib/supabaseClient";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Search, Plus, X } from "lucide-react";
|
import { Search, Plus, X } from "lucide-react";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useAuth } from "@/hooks/useAuth";
|
import { useAuth } from "@/hooks/useAuth";
|
||||||
import { supabase } from "@/integrations/supabase/client";
|
import { supabase } from "@/lib/supabaseClient";
|
||||||
import { UserTopList, UserTopListItem } from "@/types/database";
|
import { UserTopList, UserTopListItem } from "@/types/database";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Label } from '@/components/ui/label';
|
|||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
import { RotateCcw } from 'lucide-react';
|
import { RotateCcw } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
||||||
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
||||||
import { FilterSection } from '@/components/filters/FilterSection';
|
import { FilterSection } from '@/components/filters/FilterSection';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Image as ImageIcon } from 'lucide-react';
|
import { Image as ImageIcon } from 'lucide-react';
|
||||||
import { PhotoModal } from './PhotoModal';
|
import { PhotoModal } from './PhotoModal';
|
||||||
import { handleError } from '@/lib/errorHandler';
|
import { handleError } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { PhotoGrid } from '@/components/common/PhotoGrid';
|
import { PhotoGrid } from '@/components/common/PhotoGrid';
|
||||||
import type { PhotoSubmissionItem } from '@/types/photo-submissions';
|
import type { PhotoSubmissionItem } from '@/types/photo-submissions';
|
||||||
import type { PhotoItem } from '@/types/photos';
|
import type { PhotoItem } from '@/types/photos';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { Search, Shield, Trash2, Ban, AlertTriangle } from 'lucide-react';
|
import { Search, Shield, Trash2, Ban, AlertTriangle } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useUserRole, UserRole } from '@/hooks/useUserRole';
|
import { useUserRole, UserRole } from '@/hooks/useUserRole';
|
||||||
import { useSuperuserGuard } from '@/hooks/useSuperuserGuard';
|
import { useSuperuserGuard } from '@/hooks/useSuperuserGuard';
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from '@/components/ui/select';
|
} from '@/components/ui/select';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { handleError, getErrorMessage } from '@/lib/errorHandler';
|
import { handleError, getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
import { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { handleError } from '@/lib/errorHandler';
|
import { handleError } from '@/lib/errorHandler';
|
||||||
import { ActivityCard } from './ActivityCard';
|
import { ActivityCard } from './ActivityCard';
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
} from '@/components/ui/select';
|
} from '@/components/ui/select';
|
||||||
import { Textarea } from '@/components/ui/textarea';
|
import { Textarea } from '@/components/ui/textarea';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
PaginationNext,
|
PaginationNext,
|
||||||
PaginationPrevious,
|
PaginationPrevious,
|
||||||
} from '@/components/ui/pagination';
|
} from '@/components/ui/pagination';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { useAdminSettings } from '@/hooks/useAdminSettings';
|
import { useAdminSettings } from '@/hooks/useAdminSettings';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect, memo } from 'react';
|
import { useState, useEffect, memo } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { SubmissionChangesDisplay } from './SubmissionChangesDisplay';
|
import { SubmissionChangesDisplay } from './SubmissionChangesDisplay';
|
||||||
import { PhotoSubmissionDisplay } from './PhotoSubmissionDisplay';
|
import { PhotoSubmissionDisplay } from './PhotoSubmissionDisplay';
|
||||||
import { Skeleton } from '@/components/ui/skeleton';
|
import { Skeleton } from '@/components/ui/skeleton';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useUserRole } from '@/hooks/useUserRole';
|
import { useUserRole } from '@/hooks/useUserRole';
|
||||||
import { handleError, handleSuccess, getErrorMessage } from '@/lib/errorHandler';
|
import { handleError, handleSuccess, getErrorMessage } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Checkbox } from '@/components/ui/checkbox';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { RotateCcw } from 'lucide-react';
|
import { RotateCcw } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
||||||
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
||||||
import { FilterSection } from '@/components/filters/FilterSection';
|
import { FilterSection } from '@/components/filters/FilterSection';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { RotateCcw } from 'lucide-react';
|
import { RotateCcw } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Park } from '@/types/database';
|
import { Park } from '@/types/database';
|
||||||
import { FilterState } from '@/pages/Parks';
|
import { FilterState } from '@/pages/Parks';
|
||||||
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
|
|||||||
import { Sheet, SheetContent, SheetTrigger, SheetHeader, SheetTitle } from '@/components/ui/sheet';
|
import { Sheet, SheetContent, SheetTrigger, SheetHeader, SheetTitle } from '@/components/ui/sheet';
|
||||||
import { ParkCard } from './ParkCard';
|
import { ParkCard } from './ParkCard';
|
||||||
import { Park } from '@/types/database';
|
import { Park } from '@/types/database';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
||||||
import { UserX, Trash2 } from 'lucide-react';
|
import { UserX, Trash2 } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { handleError, handleSuccess } from '@/lib/errorHandler';
|
import { handleError, handleSuccess } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { AutocompleteSearch } from '@/components/search/AutocompleteSearch';
|
import { AutocompleteSearch } from '@/components/search/AutocompleteSearch';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { Calendar } from '@/components/ui/calendar';
|
import { Calendar } from '@/components/ui/calendar';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Calendar, MapPin, Edit, Trash2, Plus, Minus, Check, X, Star, Factory, Gauge, Ruler, Zap } from 'lucide-react';
|
import { Calendar, MapPin, Edit, Trash2, Plus, Minus, Check, X, Star, Factory, Gauge, Ruler, Zap } from 'lucide-react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { UserRideCredit } from '@/types/database';
|
import { UserRideCredit } from '@/types/database';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
import { Plus, LayoutGrid, List, GripVertical } from 'lucide-react';
|
import { Plus, LayoutGrid, List, GripVertical } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { handleError } from '@/lib/errorHandler';
|
import { handleError } from '@/lib/errorHandler';
|
||||||
import { AddRideCreditDialog } from './AddRideCreditDialog';
|
import { AddRideCreditDialog } from './AddRideCreditDialog';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
|
|||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { UserX } from 'lucide-react';
|
import { UserX } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
|||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||||
import { Star, Calendar, MapPin, Edit, Trash2, ThumbsUp } from 'lucide-react';
|
import { Star, Calendar, MapPin, Edit, Trash2, ThumbsUp } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { StarRating } from '@/components/reviews/StarRating';
|
import { StarRating } from '@/components/reviews/StarRating';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Progress } from '@/components/ui/progress';
|
import { Progress } from '@/components/ui/progress';
|
||||||
import { Star } from 'lucide-react';
|
import { Star } from 'lucide-react';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Camera } from 'lucide-react';
|
import { Camera } from 'lucide-react';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
|
|||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { RotateCcw } from 'lucide-react';
|
import { RotateCcw } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
import { FilterRangeSlider } from '@/components/filters/FilterRangeSlider';
|
||||||
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
import { FilterDateRangePicker } from '@/components/filters/FilterDateRangePicker';
|
||||||
import { FilterSection } from '@/components/filters/FilterSection';
|
import { FilterSection } from '@/components/filters/FilterSection';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { RideCard } from '@/components/rides/RideCard';
|
import { RideCard } from '@/components/rides/RideCard';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Badge } from '@/components/ui/badge';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { MapPin, Star, Search as SearchIcon, Castle, FerrisWheel, Waves, Theater, Factory } from 'lucide-react';
|
import { MapPin, Star, Search as SearchIcon, Castle, FerrisWheel, Waves, Theater, Factory } from 'lucide-react';
|
||||||
import { Park, Ride, Company } from '@/types/database';
|
import { Park, Ride, Company } from '@/types/database';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Checkbox } from '@/components/ui/checkbox';
|
import { Checkbox } from '@/components/ui/checkbox';
|
||||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Loader2, AlertTriangle, Info } from 'lucide-react';
|
import { Loader2, AlertTriangle, Info } from 'lucide-react';
|
||||||
import {
|
import {
|
||||||
deletionDialogReducer,
|
deletionDialogReducer,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { Separator } from '@/components/ui/separator';
|
|||||||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useProfile } from '@/hooks/useProfile';
|
import { useProfile } from '@/hooks/useProfile';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Trash2, Mail, AlertCircle, X, Check, Loader2 } from 'lucide-react';
|
import { Trash2, Mail, AlertCircle, X, Check, Loader2 } from 'lucide-react';
|
||||||
import { PhotoUpload } from '@/components/upload/PhotoUpload';
|
import { PhotoUpload } from '@/components/upload/PhotoUpload';
|
||||||
import { notificationService } from '@/lib/notificationService';
|
import { notificationService } from '@/lib/notificationService';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Switch } from '@/components/ui/switch';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useProfile } from '@/hooks/useProfile';
|
import { useProfile } from '@/hooks/useProfile';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { handleError, handleSuccess, AppError } from '@/lib/errorHandler';
|
import { handleError, handleSuccess, AppError } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { Download, Activity, BarChart3, AlertCircle, Clock } from 'lucide-react';
|
import { Download, Activity, BarChart3, AlertCircle, Clock } from 'lucide-react';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { AlertTriangle, Loader2 } from 'lucide-react';
|
import { AlertTriangle, Loader2 } from 'lucide-react';
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { handleError, handleSuccess, AppError, getErrorMessage } from '@/lib/errorHandler';
|
import { handleError, handleSuccess, AppError, getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Loader2, Mail, CheckCircle2, AlertCircle } from 'lucide-react';
|
import { Loader2, Mail, CheckCircle2, AlertCircle } from 'lucide-react';
|
||||||
import { TurnstileCaptcha } from '@/components/auth/TurnstileCaptcha';
|
import { TurnstileCaptcha } from '@/components/auth/TurnstileCaptcha';
|
||||||
import { useTheme } from '@/components/theme/ThemeProvider';
|
import { useTheme } from '@/components/theme/ThemeProvider';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { Separator } from '@/components/ui/separator';
|
import { Separator } from '@/components/ui/separator';
|
||||||
import { Progress } from '@/components/ui/progress';
|
import { Progress } from '@/components/ui/progress';
|
||||||
import { Mail, Info, CheckCircle2, Circle, Loader2 } from 'lucide-react';
|
import { Mail, Info, CheckCircle2, Circle, Loader2 } from 'lucide-react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { handleError, handleSuccess } from '@/lib/errorHandler';
|
import { handleError, handleSuccess } from '@/lib/errorHandler';
|
||||||
|
|
||||||
interface EmailChangeStatusProps {
|
interface EmailChangeStatusProps {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { Skeleton } from '@/components/ui/skeleton';
|
|||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useProfile } from '@/hooks/useProfile';
|
import { useProfile } from '@/hooks/useProfile';
|
||||||
import { useUnitPreferences } from '@/hooks/useUnitPreferences';
|
import { useUnitPreferences } from '@/hooks/useUnitPreferences';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { handleError, handleSuccess, AppError } from '@/lib/errorHandler';
|
import { handleError, handleSuccess, AppError } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { MapPin, Calendar, Accessibility, Ruler } from 'lucide-react';
|
import { MapPin, Calendar, Accessibility, Ruler } from 'lucide-react';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { handleError, handleSuccess, AppError, getErrorMessage } from '@/lib/errorHandler';
|
import { handleError, handleSuccess, AppError, getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Loader2, Shield, CheckCircle2 } from 'lucide-react';
|
import { Loader2, Shield, CheckCircle2 } from 'lucide-react';
|
||||||
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
|
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
|
||||||
import { TurnstileCaptcha } from '@/components/auth/TurnstileCaptcha';
|
import { TurnstileCaptcha } from '@/components/auth/TurnstileCaptcha';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { handleError, handleSuccess, AppError } from '@/lib/errorHandler';
|
|||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { useProfile } from '@/hooks/useProfile';
|
import { useProfile } from '@/hooks/useProfile';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Eye, UserX, Shield, Search } from 'lucide-react';
|
import { Eye, UserX, Shield, Search } from 'lucide-react';
|
||||||
import { BlockedUsers } from '@/components/privacy/BlockedUsers';
|
import { BlockedUsers } from '@/components/privacy/BlockedUsers';
|
||||||
import type { PrivacySettings, PrivacyFormData } from '@/types/privacy';
|
import type { PrivacySettings, PrivacyFormData } from '@/types/privacy';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
} from '@/lib/identityService';
|
} from '@/lib/identityService';
|
||||||
import type { UserIdentity, OAuthProvider } from '@/types/identity';
|
import type { UserIdentity, OAuthProvider } from '@/types/identity';
|
||||||
import type { AuthSession } from '@/types/auth';
|
import type { AuthSession } from '@/types/auth';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
import { SessionRevokeConfirmDialog } from './SessionRevokeConfirmDialog';
|
import { SessionRevokeConfirmDialog } from './SessionRevokeConfirmDialog';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { TimelineEventEditorDialog } from './TimelineEventEditorDialog';
|
|||||||
import { TimelineEventCard } from './TimelineEventCard';
|
import { TimelineEventCard } from './TimelineEventCard';
|
||||||
import { EntityHistoryTimeline } from '@/components/history/EntityHistoryTimeline';
|
import { EntityHistoryTimeline } from '@/components/history/EntityHistoryTimeline';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { getErrorMessage, handleError } from '@/lib/errorHandler';
|
import { getErrorMessage, handleError } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
ContextMenuTrigger,
|
ContextMenuTrigger,
|
||||||
} from '@/components/ui/context-menu';
|
} from '@/components/ui/context-menu';
|
||||||
import { DragDropZone } from './DragDropZone';
|
import { DragDropZone } from './DragDropZone';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { toast } from '@/hooks/use-toast';
|
import { toast } from '@/hooks/use-toast';
|
||||||
import { Skeleton } from '@/components/ui/skeleton';
|
import { Skeleton } from '@/components/ui/skeleton';
|
||||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import { UppyPhotoSubmissionUpload } from '@/components/upload/UppyPhotoSubmissionUpload';
|
import { UppyPhotoSubmissionUpload } from '@/components/upload/UppyPhotoSubmissionUpload';
|
||||||
import { PhotoManagementDialog } from '@/components/upload/PhotoManagementDialog';
|
import { PhotoManagementDialog } from '@/components/upload/PhotoManagementDialog';
|
||||||
import { PhotoModal } from '@/components/moderation/PhotoModal';
|
import { PhotoModal } from '@/components/moderation/PhotoModal';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { EntityPhotoGalleryProps } from '@/types/submissions';
|
import { EntityPhotoGalleryProps } from '@/types/submissions';
|
||||||
import { useUserRole } from '@/hooks/useUserRole';
|
import { useUserRole } from '@/hooks/useUserRole';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { Separator } from "@/components/ui/separator";
|
|||||||
import { Progress } from "@/components/ui/progress";
|
import { Progress } from "@/components/ui/progress";
|
||||||
import { UppyPhotoUploadLazy } from "./UppyPhotoUploadLazy";
|
import { UppyPhotoUploadLazy } from "./UppyPhotoUploadLazy";
|
||||||
import { PhotoCaptionEditor, PhotoWithCaption } from "./PhotoCaptionEditor";
|
import { PhotoCaptionEditor, PhotoWithCaption } from "./PhotoCaptionEditor";
|
||||||
import { supabase } from "@/integrations/supabase/client";
|
import { supabase } from "@/lib/supabaseClient";
|
||||||
import { useAuth } from "@/hooks/useAuth";
|
import { useAuth } from "@/hooks/useAuth";
|
||||||
import { useToast } from "@/hooks/use-toast";
|
import { useToast } from "@/hooks/use-toast";
|
||||||
import { Camera, CheckCircle, AlertCircle, Info } from "lucide-react";
|
import { Camera, CheckCircle, AlertCircle, Info } from "lucide-react";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { supabase } from '@/integrations/supabase/client';
|
import { supabase } from '@/lib/supabaseClient';
|
||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||||
import { logger } from '@/lib/logger';
|
import { logger } from '@/lib/logger';
|
||||||
|
|||||||
Reference in New Issue
Block a user