mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 04:11:14 -05:00
Refactor: Simplify auth and profile handling
This commit is contained in:
@@ -13,6 +13,7 @@ import { Separator } from '@/components/ui/separator';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { useProfile } from '@/hooks/useProfile';
|
||||
import { useUsernameValidation } from '@/hooks/useUsernameValidation';
|
||||
import { User, MapPin, Calendar, Star, Trophy, Settings, Camera, Edit3, Save, X, ArrowLeft, Check, AlertCircle, Loader2, UserX, FileText, Image } from 'lucide-react';
|
||||
import { Profile as ProfileType } from '@/types/database';
|
||||
@@ -36,9 +37,8 @@ export default function Profile() {
|
||||
const {
|
||||
toast
|
||||
} = useToast();
|
||||
const {
|
||||
refreshProfile
|
||||
} = useAuth();
|
||||
const { user: authUser } = useAuth();
|
||||
const { refreshProfile } = useProfile(authUser?.id);
|
||||
const [profile, setProfile] = useState<ProfileType | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [editing, setEditing] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user