fix and update
This commit is contained in:
@@ -23,6 +23,8 @@ import { useToast } from '@/components/id/toast-provider';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { PinInput } from '@/components/ui/pin-input';
|
||||
import { isPinInputComplete } from '@/lib/pin-input';
|
||||
|
||||
import { OtpInput } from '@/components/ui/otp-input';
|
||||
|
||||
@@ -1369,7 +1371,7 @@ export default function LoginPage() {
|
||||
|
||||
<form onSubmit={handlePinSubmit} className="space-y-3">
|
||||
|
||||
<Input
|
||||
<PinInput
|
||||
|
||||
className="h-[58px] border-[#555762] bg-transparent text-center text-lg tracking-[0.4em] text-white placeholder:text-[#8f92a0]"
|
||||
|
||||
@@ -1377,7 +1379,7 @@ export default function LoginPage() {
|
||||
|
||||
value={pin}
|
||||
|
||||
onChange={(event) => setPin(event.target.value)}
|
||||
onChange={setPin}
|
||||
|
||||
required
|
||||
|
||||
@@ -1387,7 +1389,7 @@ export default function LoginPage() {
|
||||
|
||||
/>
|
||||
|
||||
<Button variant="white" size="lg" className="w-full rounded-[18px] text-base" disabled={isSubmitting}>
|
||||
<Button variant="white" size="lg" className="w-full rounded-[18px] text-base" disabled={isSubmitting || !isPinInputComplete(pin)}>
|
||||
|
||||
{isSubmitting ? 'Проверяем...' : 'Подтвердить PIN'}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import { useAuth } from '@/components/id/auth-provider';
|
||||
import { useToast } from '@/components/id/toast-provider';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { PinInput } from '@/components/ui/pin-input';
|
||||
import { isPinInputComplete } from '@/lib/pin-input';
|
||||
import { OtpInput } from '@/components/ui/otp-input';
|
||||
import { PhoneInput, phoneCountries, toE164 } from '@/components/ui/phone-input';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
@@ -166,16 +168,16 @@ export default function RegisterPage() {
|
||||
{step === 'pin' && pendingSessionId ? (
|
||||
<form onSubmit={handlePinSubmit} className="mt-8 space-y-3">
|
||||
<p className="text-center text-sm text-[#b9bdc9]">Установите PIN для завершения регистрации</p>
|
||||
<Input
|
||||
<PinInput
|
||||
className="h-[58px] border-[#555762] bg-transparent text-center text-lg tracking-[0.4em] text-white placeholder:text-[#8f92a0]"
|
||||
placeholder="PIN"
|
||||
value={pin}
|
||||
onChange={(event) => setPin(event.target.value)}
|
||||
onChange={setPin}
|
||||
required
|
||||
minLength={4}
|
||||
maxLength={6}
|
||||
/>
|
||||
<Button variant="white" size="lg" className="w-full rounded-[18px] text-base" disabled={isSubmitting}>
|
||||
<Button variant="white" size="lg" className="w-full rounded-[18px] text-base" disabled={isSubmitting || !isPinInputComplete(pin)}>
|
||||
{isSubmitting ? 'Проверяем...' : 'Подтвердить PIN'}
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user