2024-02-28 21:02:05 +03:00
|
|
|
import React, { type FC } from 'react';
|
2024-01-31 04:18:12 +03:00
|
|
|
import Box from '@mui/material/Box';
|
|
|
|
import itemHelper from 'components/itemHelper';
|
|
|
|
import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils';
|
|
|
|
import type { ItemDto } from 'types/itemDto';
|
|
|
|
|
|
|
|
interface DefaultNameProps {
|
|
|
|
item: ItemDto;
|
|
|
|
}
|
|
|
|
|
|
|
|
const DefaultName: FC<DefaultNameProps> = ({ item }) => {
|
|
|
|
const defaultName = isUsingLiveTvNaming(item.Type) ?
|
|
|
|
item.Name :
|
|
|
|
itemHelper.getDisplayName(item);
|
|
|
|
return (
|
|
|
|
<Box className='cardText cardDefaultText'>
|
2024-02-28 21:18:37 +03:00
|
|
|
{defaultName}
|
2024-01-31 04:18:12 +03:00
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default DefaultName;
|