mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 03:11:12 -05:00
Refactor: Simplify auth and profile handling
This commit is contained in:
@@ -8,6 +8,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { useProfile } from '@/hooks/useProfile';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { Eye, UserX, Shield, Search } from 'lucide-react';
|
||||
import { BlockedUsers } from '@/components/privacy/BlockedUsers';
|
||||
@@ -26,14 +27,9 @@ interface ProfilePrivacy {
|
||||
show_pronouns: boolean;
|
||||
}
|
||||
export function PrivacyTab() {
|
||||
const {
|
||||
user,
|
||||
profile,
|
||||
refreshProfile
|
||||
} = useAuth();
|
||||
const {
|
||||
toast
|
||||
} = useToast();
|
||||
const { user } = useAuth();
|
||||
const { data: profile, refreshProfile } = useProfile(user?.id);
|
||||
const { toast } = useToast();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [preferences, setPreferences] = useState<PrivacySettings | null>(null);
|
||||
const form = useForm<ProfilePrivacy & PrivacySettings>({
|
||||
|
||||
Reference in New Issue
Block a user