Fixed: Loading series details when Quality Profile is invalid
This commit is contained in:
parent
8f7f23c938
commit
c8896d9f5f
|
@ -0,0 +1,3 @@
|
|||
.qualityProfileUnknown {
|
||||
color: var(--dangerColor);
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
// This file is automatically generated.
|
||||
// Please do not change this file!
|
||||
interface CssExports {
|
||||
'qualityProfileUnknown': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
export default cssExports;
|
|
@ -3,22 +3,30 @@ import React from 'react';
|
|||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import createQualityProfileSelector from 'Store/Selectors/createQualityProfileSelector';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './QualityProfileNameConnector.css';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
createQualityProfileSelector(),
|
||||
(qualityProfile) => {
|
||||
return {
|
||||
name: qualityProfile.name
|
||||
name: qualityProfile?.name
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function QualityProfileNameConnector({ name, ...otherProps }) {
|
||||
function QualityProfileNameConnector({ name }) {
|
||||
if (name) {
|
||||
return (
|
||||
<span>{name}</span>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<span>
|
||||
{name}
|
||||
<span className={styles.qualityProfileUnknown}>
|
||||
{translate('None')}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue