Skip to content

Commit

Permalink
Merge branch 'main' into Update-logo-on-website-Curio-org#43
Browse files Browse the repository at this point in the history
  • Loading branch information
sdthaker authored Oct 11, 2023
2 parents 59ed1b7 + 81853b7 commit 62c700c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class App extends React.Component {
playing: false,
time: 0,
maxTime: 0,
}
},
showUnderHeader: true
}

getAudio = () => {
Expand All @@ -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
})
Expand Down Expand Up @@ -80,7 +88,7 @@ class App extends React.Component {
<Route path="/">
<div style={{marginTop: '1em'}}>
<SearchBar handleFormSubmit={this.handleSubmit}/>
<UnderHeader />
{this.state.showUnderHeader ? <UnderHeader /> : null}
<VideoList setVidId={this.setVidId} setRecId={this.setRecId} videos={this.state.videos}/>
</div>
</Route>
Expand Down

0 comments on commit 62c700c

Please sign in to comment.