Fix NavBar title translations
This commit is contained in:
@@ -7,11 +7,14 @@ import {
|
||||
SimpleForm,
|
||||
SelectInput,
|
||||
ReferenceInput,
|
||||
useTranslate,
|
||||
} from 'react-admin'
|
||||
import { Title } from '../common'
|
||||
|
||||
const PlayerTitle = ({ record }) => {
|
||||
return <Title subTitle={`Player ${record ? record.name : ''}`} />
|
||||
const translate = useTranslate()
|
||||
const resourceName = translate('resources.player.name', { smart_count: 1 })
|
||||
return <Title subTitle={`${resourceName} ${record ? record.name : ''}`} />
|
||||
}
|
||||
|
||||
const PlayerEdit = (props) => (
|
||||
|
||||
@@ -13,7 +13,13 @@ import { SimpleList, Title } from '../common'
|
||||
const PlayerList = (props) => {
|
||||
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
|
||||
return (
|
||||
<List title={<Title subTitle={'Players'} />} exporter={false} {...props}>
|
||||
<List
|
||||
title={
|
||||
<Title subTitle={'resources.player.name'} args={{ smart_count: 2 }} />
|
||||
}
|
||||
exporter={false}
|
||||
{...props}
|
||||
>
|
||||
{isXsmall ? (
|
||||
<SimpleList
|
||||
primaryText={(r) => r.client}
|
||||
|
||||
Reference in New Issue
Block a user