Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor notification panel to custom hook #418

Merged
merged 2 commits into from
Nov 13, 2019

Conversation

thyhjwb6
Copy link
Collaborator

@thyhjwb6 thyhjwb6 commented Nov 11, 2019

Related issue

#223

Overview

Refactor of NotificationPanel

Reason

Having done the recent notifications work, this was a good opportunity to refactor the NotificationPanel.

Work carried out

  • Refactor
  • Update tests

Screenshot

There should be no visual difference.

Developer notes

Note that the fixup commit was to address issues with Code Climate. This will be squashed once approved.

@thyhjwb6 thyhjwb6 self-assigned this Nov 11, 2019
@thyhjwb6 thyhjwb6 force-pushed the refactor/notification-panel branch 2 times, most recently from 28fb89d to e52a286 Compare November 13, 2019 11:12
@thyhjwb6 thyhjwb6 changed the title [WIP] Refactor notification panel to custom hook Refactor notification panel to custom hook Nov 13, 2019
@thyhjwb6 thyhjwb6 marked this pull request as ready for review November 13, 2019 14:33
Copy link
Collaborator

@m7kvqbe1 m7kvqbe1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks lovely to me!

@@ -0,0 +1,27 @@
import React, { useEffect } from 'react'

// workaround for undefined error in typescript, node.current might not be defined
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you manage to figure out what this was about?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a TypeScript error when there is not an alternative for node.current being set. Whether this is the only option, I don't know.

@thyhjwb6 thyhjwb6 force-pushed the refactor/notification-panel branch from e52a286 to 1c7fbd3 Compare November 13, 2019 15:30
@thyhjwb6 thyhjwb6 merged commit c87755d into develop Nov 13, 2019
@thyhjwb6 thyhjwb6 deleted the refactor/notification-panel branch November 13, 2019 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants