feat: add i18next for arm (#17)
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good
All checks were successful
it-academy/dry-wash-pl/pipeline/pr-main This commit looks good
This commit is contained in:
@@ -13,10 +13,10 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import { mastersData } from '../../mocks';
|
||||
import MasterItem from '../MasterItem';
|
||||
import MasterDrawer from '../MasterModal';
|
||||
import MasterDrawer from '../MasterDrawer';
|
||||
import i18next from 'i18next';
|
||||
|
||||
const TABLE_HEADERS = ['Имя', 'Актуальная занятость', 'Телефон', 'Действия'];
|
||||
const TABLE_HEADERS = ['name', 'currentJob', 'phone', 'actions'];
|
||||
|
||||
const Masters = () => {
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
@@ -24,16 +24,18 @@ const Masters = () => {
|
||||
return (
|
||||
<Box p='8'>
|
||||
<Flex justifyContent='space-between' alignItems='center' mb='5'>
|
||||
<Heading size='lg'>Мастера</Heading>
|
||||
<Heading size='lg'> {i18next.t('dry-wash.arm.master.title')}</Heading>
|
||||
<Button colorScheme='green' onClick={onOpen}>
|
||||
+ {i18next.t('dry-wash.arm.masters.add')}
|
||||
+ {i18next.t('dry-wash.arm.master.add')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<Table variant='simple' colorScheme='blackAlpha'>
|
||||
<Thead>
|
||||
<Tr>
|
||||
{TABLE_HEADERS.map((name) => (
|
||||
<Th key={name}>{name}</Th>
|
||||
<Th key={name}>
|
||||
{i18next.t(`dry-wash.arm.master.table.header.${name}`)}
|
||||
</Th>
|
||||
))}
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
||||
Reference in New Issue
Block a user