Skip to content

Commit

Permalink
Voting: do not display the sync indicator with the empty state (#1020)
Browse files Browse the repository at this point in the history
The empty state also contains a sync indicator.
  • Loading branch information
bpierre authored Oct 9, 2019
1 parent c685c43 commit 4d9d138
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/voting/app/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ const App = React.memo(function App() {

return (
<React.Fragment>
<SyncIndicator visible={isSyncing} />
{!votes.length && (
{votes.length === 0 && (
<div
css={`
height: calc(100vh - ${8 * GU}px);
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -63,8 +62,9 @@ const App = React.memo(function App() {
<NoVotes onNewVote={newVotePanel.requestOpen} isSyncing={isSyncing} />
</div>
)}
{!!votes.length && (
{votes.length > 0 && (
<React.Fragment>
<SyncIndicator visible={isSyncing} />
<Header
primary="Voting"
secondary={
Expand Down

0 comments on commit 4d9d138

Please sign in to comment.