Skip to content

Commit

Permalink
Merge pull request #119 from sproogen/b/#117-loading-bug
Browse files Browse the repository at this point in the history
Loading screen fix
  • Loading branch information
sproogen committed Aug 16, 2017
2 parents 45041ef + ca580dc commit e87e882
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
4 changes: 1 addition & 3 deletions app/Resources/client/src/routes/Answer/Answer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ class Answer extends React.Component {
if (response instanceof APIError) {
if (response.details.status === 401 && response.details.error.error === 'incorrect-passphrase') {
this.props.setRequiresPassphrase(true)
this.props.setLoading(false)
} else {
browserHistory.push('/404')
}
} else {
this.props.setLoading(false)
}
this.props.setLoading(false)
})
}

Expand Down
6 changes: 5 additions & 1 deletion app/Resources/client/src/routes/NotFound/NotFound.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react'
import Back from 'components/Back/Back'
import './NotFound.scss'

export const NotFound = () => (
<div>
<Back />
<div className='container header-container answer-header-container'>
<div className='header center-text'>
<h1>404</h1>
<h1 className='not-found'>
Oh no!<br />
<span>It looks like we couldn't find that poll.</span>
</h1>
</div>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions app/Resources/client/src/routes/NotFound/NotFound.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
h1.not-found {
font-size: 5em;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: fixed;

span {
font-size: 0.6em;
}
}

0 comments on commit e87e882

Please sign in to comment.