base commit

This commit is contained in:
@kirill.komarov
2026-05-10 14:28:35 +05:00
parent 1e376caecc
commit 5ddde15fd3
102 changed files with 332 additions and 7657 deletions
+3
View File
@@ -12,6 +12,9 @@ apiClient.interceptors.request.use((config) => {
if (!token) return config
config.headers = config.headers ?? {}
config.headers.Authorization = `Bearer ${token}`
if (config.data instanceof FormData) {
delete config.headers['Content-Type']
}
return config
} catch {
return config
@@ -0,0 +1,12 @@
/** Текст модалки оплаты (можно переопределить через VITE_PAYMENT_INSTRUCTIONS — многострочная строка \n). */
const fromEnv =
typeof import.meta.env.VITE_PAYMENT_INSTRUCTIONS === 'string' ? import.meta.env.VITE_PAYMENT_INSTRUCTIONS.trim() : ''
export const PAYMENT_TRANSFER_INSTRUCTIONS_PLAIN =
fromEnv ||
[
'Временно оплата доступна только переводом на ВТБ / Сбербанк.',
'',
'По номеру +79524181624',
'Получатель: Лариса К',
].join('\n')
+26
View File
@@ -0,0 +1,26 @@
import Box from '@mui/material/Box'
import { RichTextMessageContent } from '@/shared/ui/RichTextMessageContent'
type Props = {
text: string
attachmentUrl?: string | null
imageAlt?: string
}
/** Текст чата заказа (TipTap HTML) и опциональное изображение (например чек). */
export function OrderMessageBody(props: Props) {
const { text, attachmentUrl, imageAlt = 'Вложение к сообщению' } = props
return (
<>
<RichTextMessageContent value={text} tone="chat" />
{attachmentUrl ? (
<Box
component="img"
src={attachmentUrl}
alt={imageAlt}
sx={{ mt: 1, maxWidth: '100%', borderRadius: 1, display: 'block', border: 1, borderColor: 'divider' }}
/>
) : null}
</>
)
}