17 lines
488 B
JavaScript
17 lines
488 B
JavaScript
import React from 'react'
|
|
import { useMediaQuery } from '@material-ui/core'
|
|
import { useTranslate } from 'react-admin'
|
|
|
|
const Title = ({ subTitle, args }) => {
|
|
const translate = useTranslate()
|
|
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
|
|
const text = translate(subTitle, { ...args, _: subTitle })
|
|
|
|
if (isDesktop) {
|
|
return <span>Navidrome {text ? ` - ${text}` : ''}</span>
|
|
}
|
|
return <span>{text ? text : 'Navidrome'}</span>
|
|
}
|
|
|
|
export default Title
|