This commit is contained in:
2025-12-05 12:26:03 -03:00
parent 04e43682fc
commit c3c319d8b6
3 changed files with 57 additions and 27 deletions

View File

@@ -1,5 +1,6 @@
import type { Route } from './+types/index'
import { useToggle } from 'ahooks'
import { PatternFormat } from 'react-number-format'
import { zodResolver } from '@hookform/resolvers/zod'
import { useEffect, useState } from 'react'
@@ -53,7 +54,7 @@ export async function action({ request, context }: Route.ActionArgs) {
export default function Signup({}: Route.ComponentProps) {
const fetcher = useFetcher()
const [show, setShow] = useState(false)
const [show, { toggle: setShow }] = useToggle(false)
const [user, setUser] = useState<User | null>(null)
const form = useForm({
resolver: zodResolver(formSchema)
@@ -185,10 +186,12 @@ export default function Signup({}: Route.ComponentProps) {
<div className="flex items-center gap-3">
<Checkbox
id="showPassword"
onClick={() => setShow((x) => !x)}
onClick={setShow}
tabIndex={-1}
/>
<Label htmlFor="showPassword">Mostrar senha</Label>
<Label htmlFor="showPassword" className="cursor-pointer">
Mostrar senha
</Label>
</div>
<FormMessage />
</FormItem>