Skip to content
Snippets Groups Projects
Commit ad830ab7 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

GH-877: Updates from review-tidy up only

parent ab6afe95
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,8 @@ export default class Listing extends React.Component { ...@@ -62,7 +62,8 @@ export default class Listing extends React.Component {
); );
} }
retryButton = (handleRetry) => { renderRetryButton = () => {
const { handleRetry } = this.props;
return <a className="listing__help-link" onClick={handleRetry}>Refresh</a>; return <a className="listing__help-link" onClick={handleRetry}>Refresh</a>;
} }
...@@ -73,7 +74,7 @@ export default class Listing extends React.Component { ...@@ -73,7 +74,7 @@ export default class Listing extends React.Component {
<h5>Something went wrong!</h5> <h5>Something went wrong!</h5>
<p>{ error }</p> <p>{ error }</p>
{ !navigator.onLine && <p>You appear to be offline.</p>} { !navigator.onLine && <p>You appear to be offline.</p>}
{ handleRetry && this.retryButton(handleRetry) } { handleRetry && this.renderRetryButton() }
</li> </li>
) )
} }
...@@ -96,7 +97,7 @@ export default class Listing extends React.Component { ...@@ -96,7 +97,7 @@ export default class Listing extends React.Component {
</div> </div>
<p className="listing__help-text listing__help-text--standout">Something went wrong!</p> <p className="listing__help-text listing__help-text--standout">Something went wrong!</p>
<p className="listing__help-text">Sorry we couldn&apos;t load the notes</p> <p className="listing__help-text">Sorry we couldn&apos;t load the notes</p>
{ this.handleRetry(handleRetry) } { this.renderRetryButton() }
</> </>
} }
</div> </div>
......
...@@ -46,7 +46,7 @@ class NoteListing extends React.Component { ...@@ -46,7 +46,7 @@ class NoteListing extends React.Component {
} }
componentWillUnmount() { componentWillUnmount() {
this.pollNotes = null; clearInterval(this.pollNotes)
} }
handleRetry = () => { handleRetry = () => {
......
...@@ -15,7 +15,7 @@ import { ...@@ -15,7 +15,7 @@ import {
import { UPDATE_NOTES, UPDATE_NOTE } from '@actions/notes' import { UPDATE_NOTES, UPDATE_NOTE } from '@actions/notes'
function submission(state={id: null, comments: []}, action) { function submission(state={comments: []}, action) {
switch(action.type) { switch(action.type) {
case START_LOADING_SUBMISSION: case START_LOADING_SUBMISSION:
return { return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment