"use client" import { Button } from "@/components/ui/button" import Image from "next/image" import { signOut, useSession } from "next-auth/react" import { LogIn } from "lucide-react" import { useRouter } from 'next/navigation' import { useTranslations, useLocale } from "next-intl" import Link from "next/link" import { cn } from "@/lib/utils" interface SignButtonProps { size?: "default" | "lg" } export function SignButton({ size = "default" }: SignButtonProps) { const router = useRouter() const locale = useLocale() const { data: session, status } = useSession() const t = useTranslations("auth.signButton") const loading = status === "loading" if (loading) { return
} if (!session?.user) { return ( ) } return (