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 Navidrome {text ? ` - ${text}` : ''} } return {text ? text : 'Navidrome'} } export default Title