fix: use sx for justifyContent in OAuthButtons, fix import order in test

This commit is contained in:
Kirill
2026-05-20 11:14:36 +05:00
parent 1873681fa6
commit c32d5e6aff
4 changed files with 4 additions and 3 deletions
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import { describe, it, expect } from 'vitest'
import { OAuthButtons } from '../ui/OAuthButtons'
describe('OAuthButtons', () => {
@@ -4,7 +4,7 @@ import { getOAuthUrl, oauthProviders } from '../lib/oauth-providers'
export function OAuthButtons() {
return (
<Stack direction="row" spacing={1} justifyContent="center">
<Stack direction="row" spacing={1} sx={{ justifyContent: 'center' }}>
{oauthProviders.map((p) => (
<Button
key={p.id}
Binary file not shown.
+2 -1
View File
@@ -122,7 +122,8 @@ export async function registerAuthRoutes(fastify) {
const phoneRaw = request.body?.phone
const phone = phoneRaw === null || phoneRaw === undefined ? null : String(phoneRaw).trim()
if (displayName !== null && displayName.length > 40) return reply.code(400).send({ error: 'Имя/ник максимум 40 символов' })
if (displayName !== null && displayName.length > 40)
return reply.code(400).send({ error: 'Имя/ник максимум 40 символов' })
if (phone !== null) {
const compact = phone.replace(/[\s()-]/g, '')
if (compact.length > 20) return reply.code(400).send({ error: 'Телефон слишком длинный' })