"use client"; import { useCallback, useMemo } from "react"; import { LogOut } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Skeleton } from "@/components/ui/skeleton"; import { useUserProfile } from "@/lib/hooks"; import { clearAuthToken } from "@/lib/api"; import { useTranslations } from "next-intl"; interface ProfilePageProps { params: Promise<{ locale: string }>; } export default function ClientProfilePage(props: ProfilePageProps) { const { data: user, isLoading, error } = useUserProfile(); const t = useTranslations(); const handleLogout = useCallback(() => { clearAuthToken(); window.location.href = "/"; }, []); const loadingSkeleton = useMemo(() => (
{t("error_loading_profile")}