diff --git a/src/App.tsx b/src/App.tsx index 77b1611..51a8c4a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,7 +21,8 @@ class App extends React.Component { playing: false, time: 0, maxTime: 0, - } + }, + showUnderHeader: true } getAudio = () => { @@ -43,6 +44,13 @@ class App extends React.Component { } }) + if (response.data.items.length === 0) { + this.setState({showUnderHeader: true}) + } + else { + this.setState({showUnderHeader: false}) + } + this.setState({ videos: response.data.items }) @@ -80,7 +88,7 @@ class App extends React.Component {
- + {this.state.showUnderHeader ? : null}