fix: forms fix for mobiles

This commit is contained in:
2025-08-11 11:00:57 +04:00
parent 6caac5743b
commit 3560afabcc
3 changed files with 11 additions and 7 deletions

View File

@ -27,7 +27,7 @@ const VerifyPhoneForm: FC = () => {
const authState = useSelector((state: RootState) => state.auth);
const handleSubmit = (values: VerifyNumberForm) => {
if (!authState.phoneNumber || !authState.loginChallenge) return;
console.log(authState.phoneNumber.replace(/ /g, ""));
@ -55,8 +55,10 @@ const VerifyPhoneForm: FC = () => {
const navigateToLogin = () => redirect("/");
return (
<form onSubmit={form.onSubmit(handleSubmit)}>
<Stack>
<form
style={{ justifyItems: "center" }}
onSubmit={form.onSubmit(handleSubmit)}>
<Stack maw={500}>
<PinInput
length={6}
placeholder="_"

View File

@ -6,11 +6,11 @@ import { Button, Stack } from "@mantine/core";
import { useForm } from "@mantine/form";
import { Auth } from "@/client";
import PhoneInput from "@/components/ui/PhoneInput/PhoneInput";
import { notifications } from "@/lib/notifications";
import {
setLoginChallenge,
setPhoneNumber,
} from "@/lib/store/features/auth/authSlice";
import { notifications } from "@/lib/notifications";
import { useAppDispatch } from "@/lib/store/store";
type LoginForm = {
@ -69,8 +69,10 @@ const LoginForm: FC<Props> = ({ loginChallenge, isCreatingId = false }) => {
const navigateToLogin = () => router.push("/");
return (
<form onSubmit={form.onSubmit(handleSubmit)}>
<Stack>
<form
style={{ justifyItems: "center" }}
onSubmit={form.onSubmit(handleSubmit)}>
<Stack maw={500}>
<PhoneInput
{...form.getInputProps("phoneNumber")}
setPhoneMask={setPhoneMask}

View File

@ -32,7 +32,7 @@ const Logo = ({ title }: Props) => {
<Title
order={4}
mb={"lg"}
style={{ color: myColor[6] }}>
style={{ color: myColor[6], textAlign: "center" }}>
{title}
</Title>
</Center>