feat: add i18next for arm (#17)
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good

This commit is contained in:
2024-11-09 18:52:38 +03:00
parent 413181617b
commit d7da2b5618
8 changed files with 78 additions and 33 deletions

View File

@@ -2,26 +2,28 @@ import { Box, Heading, Table, Thead, Tbody, Tr, Th } from '@chakra-ui/react';
import React from 'react';
import { ordersData } from '../../mocks';
import OrderItem from '../OrderItem';
import i18next from 'i18next';
const Orders = () => {
const TABLE_HEADERS = [
'Номер машины',
'Время мойки',
'Дата заказа',
'Статус',
'Телефон',
'Расположение',
'carNumber',
'washingTime',
'orderDate',
'status',
'telephone',
'location',
];
return (
<Box p='8'>
<Heading size='lg' mb='5'>
Заказы
{i18next.t('dry-wash.arm.order.title')}
</Heading>
<Table variant='simple' colorScheme='blackAlpha'>
<Thead>
<Tr>
{TABLE_HEADERS.map((name, key) => (
<Th key={key}>{name}</Th>
<Th key={key}>
{i18next.t(`dry-wash.arm.order.table.header.${name}`)}
</Th>
))}
</Tr>
</Thead>