fix premature source close

This commit is contained in:
Lachlan Kermode
2018-12-26 10:31:06 +01:00
parent 1d6988edce
commit fb925aecdd
3 changed files with 9 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ export default connect(
// ...state,
// app: {
// ...state.app,
// source: state.domain.sources["Anna News - Horbatenko Tanks Video"]
// source: state.domain.sources["Ilovaisk The Terrible Truth - 1551603_1553607 Chumaky Approach 29 Aug Video"]
// }
// }),
state => state,

View File

@@ -73,7 +73,7 @@ class SourceOverlay extends React.Component {
const {id, url, title, date, type, affil_1, affil_2} = this.props.source
return (
<div className="mo-overlay">
<div className="mo-container" onClick={this.props.onCancel}>
<div className="mo-container">
<div className="mo-header">
<div className="mo-header-close" onClick={this.props.onCancel}>
<button className="side-menu-burg is-active"><span></span></button>

View File

@@ -25,6 +25,13 @@ const CardSource = ({ source, isLoading, onClickHandler }) => {
}
}
if (typeof source !== 'object') {
return (
<div className="card-source">
<div>Error: this source was not found</div>
</div>
)
}
return (
<div className="card-source">
{isLoading