diff --git a/src/app/actions/definitions.ts b/src/app/actions/definitions.ts index 885da0f..f18a5a5 100644 --- a/src/app/actions/definitions.ts +++ b/src/app/actions/definitions.ts @@ -29,12 +29,8 @@ export const SignupFormSchema = z password: z .string() .min(8, { error: 'Длина пароля должна быть не менее 8 символов.' }) - .regex(/[a-zA-Z]/, { error: 'Пароль должен содержать как минимум 1 букву.' }) + .regex(/[a-zA-Zа-яёА-ЯЁ]/, { error: 'Пароль должен содержать как минимум 1 букву.' }) .regex(/[0-9]/, { error: 'Пароль должен содержать как минимум 1 цифру.' }) - .refine((value) => !/[а-яёА-ЯЁ]/.test(value), - { - message: 'Пароль не должен содержать кириллицу.' - }) .trim(), confirm_password: z .string(), diff --git a/src/app/layout.tsx b/src/app/layout.tsx index cc5af30..0cb2844 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,4 +1,4 @@ -import Providers from './providers/providers' +import Providers from './providers/getQueryServer' import type { Metadata } from "next"; import "./styles/globals.css"; import "./styles/global-styles.scss" diff --git a/src/app/providers/providers.tsx b/src/app/providers/getQueryServer.tsx similarity index 100% rename from src/app/providers/providers.tsx rename to src/app/providers/getQueryServer.tsx diff --git a/src/app/terms-and-privacy-policy/page.tsx b/src/app/terms-and-privacy-policy/page.tsx new file mode 100644 index 0000000..b4ee21e --- /dev/null +++ b/src/app/terms-and-privacy-policy/page.tsx @@ -0,0 +1,7 @@ +export default function Page() { + return ( +
+ terms-and-privacy-policy +
+ ) +} \ No newline at end of file diff --git a/src/app/ui/register-form.tsx b/src/app/ui/register-form.tsx index 676a2bb..94c892d 100644 --- a/src/app/ui/register-form.tsx +++ b/src/app/ui/register-form.tsx @@ -4,6 +4,7 @@ import styles from '@/app/styles/login.module.scss'; import { useActionState } from 'react'; import { registration } from '@/app/actions/auth'; import PhoneInput from '@/app/ui/inputs/phone-input'; +import Link from 'next/link'; export default function RegisterForm() { const [state, formAction, isPending] = useActionState( @@ -107,7 +108,14 @@ export default function RegisterForm() { name="agree" defaultChecked={state?.previousState?.agree ? true : false} /> - + {state?.error?.agree && (

{state?.error?.agree}

diff --git a/src/proxy.ts b/src/proxy.ts index 225b469..62733a5 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -11,8 +11,6 @@ export default async function proxy(request: NextRequest) { const isPublicRoute = publicRoutes.includes(path); const cookie = (await cookies()).get('session')?.value; - console.log("-cookie-"); - console.log(!!cookie); const session = await decrypt(cookie); if (isProtectedRoute && !session?.token) {