add test to checkout
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useRequest, useToggle } from 'ahooks'
|
||||
import { CheckIcon, UserIcon, XIcon } from 'lucide-react'
|
||||
import { CheckIcon, UserIcon, XIcon, AlertTriangleIcon } from 'lucide-react'
|
||||
import { formatCPF } from '@brazilian-utils/brazilian-utils'
|
||||
|
||||
import { Avatar, AvatarFallback } from '@repo/ui/components/ui/avatar'
|
||||
@@ -109,6 +109,7 @@ export function AsyncCombobox({
|
||||
key={id}
|
||||
value={id}
|
||||
className="cursor-pointer"
|
||||
disabled={!cpf}
|
||||
onSelect={() => {
|
||||
onChange?.({ id, name, email, cpf })
|
||||
set(false)
|
||||
@@ -128,10 +129,16 @@ export function AsyncCombobox({
|
||||
<li className="text-muted-foreground text-sm">
|
||||
<Abbr>{email}</Abbr>
|
||||
</li>
|
||||
{cpf && (
|
||||
|
||||
{cpf ? (
|
||||
<li className="text-muted-foreground text-sm">
|
||||
{formatCPF(cpf)}
|
||||
</li>
|
||||
) : (
|
||||
<li className="flex gap-1 items-center text-red-400">
|
||||
<AlertTriangleIcon className="text-red-400" />
|
||||
Inelegível
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user