mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-27 08:12:48 +00:00
* New: Release Profiles - UI Updates * New: Release Profiles - API Changes * New: Release Profiles - Test Updates * New: Release Profiles - Backend Updates * New: Interactive Artist Search * New: Change Montiored on Album Details Page * New: Show Duration on Album Details Page * Fixed: Manual Import not working if no albums are Missing * Fixed: Sort search input by sortTitle * Fixed: Queue columnLabel throwing JS error
37 lines
659 B
JavaScript
37 lines
659 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import Label from 'Components/Label';
|
|
import { kinds } from 'Helpers/Props';
|
|
|
|
function TrackLanguage(props) {
|
|
const {
|
|
className,
|
|
language,
|
|
isCutoffNotMet
|
|
} = props;
|
|
|
|
if (!language) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Label
|
|
className={className}
|
|
kind={isCutoffNotMet ? kinds.INVERSE : kinds.DEFAULT}
|
|
>
|
|
{language.name}
|
|
</Label>
|
|
);
|
|
}
|
|
|
|
TrackLanguage.propTypes = {
|
|
className: PropTypes.string,
|
|
language: PropTypes.object,
|
|
isCutoffNotMet: PropTypes.bool
|
|
};
|
|
|
|
TrackLanguage.defaultProps = {
|
|
isCutoffNotMet: true
|
|
};
|
|
|
|
export default TrackLanguage;
|