'use client'; import clsx from 'clsx'; import { ArrowRightIcon as LogOutIcon } from '@heroicons/react/24/outline'; import { doLogout } from './actions'; import LoadingDots from 'components/loading-dots'; import { useFormState, useFormStatus } from 'react-dom'; function SubmitButton(props: any) { const { pending } = useFormStatus(); const buttonClasses = 'relative flex w-full items-center justify-center rounded-full bg-blue-600 p-4 tracking-wide text-white'; return ( <> {props?.message &&
{props?.message}
} ); } export function AccountProfile() { const [message, formAction] = useFormState(doLogout, null); return (

{message}

); }