'use client' import { Button, ButtonProps } from '@/components/ui/button' import { Loader2 } from 'lucide-react' import { ReactNode, useState } from 'react' type Props = ButtonProps & { action?: () => Promise loadingContent?: ReactNode } export function AsyncButton({ action, children, loadingContent, ...props }: Props) { const [loading, setLoading] = useState(false) return ( ) }