-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement pingers page #2
Implement pingers page #2
Conversation
44db724
to
51fab3d
Compare
d70bc7a
to
58a1435
Compare
58a1435
to
c66222f
Compare
baa5350
to
04a68c7
Compare
c8a19d2
to
fad142b
Compare
fad142b
to
1d5138f
Compare
e3a1885
to
c37fa72
Compare
c37fa72
to
ee4842c
Compare
ee4842c
to
9f650f5
Compare
src/pages/Pingers/Pingers.tsx
Outdated
if (pingers.error) { | ||
return <h1>Error: {JSON.stringify(pingers.error)}</h1>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: Would you mind just console.log
ing the error (and maybe sending to bugsnag too) instead of showing it in the UI. The users shouldn't see the error messages. So ideally just a friendly error message is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fluent in graphql and bugsnag, but it seems to me that this should already handle reporting to it:
https://github.com/dmitrijs-balcers/pinger-app/blob/1acc627fc140d14af5403eebe23f942c51bfa8fb/src/shared/apollo-client.ts#L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Just a few small nitpicks.
Plus: could you please take care of the eslint warnings?
WARNING in src/components/Form/Fields/RegionField/RegionField.tsx
Line 43:10: 'center' is assigned a value but never used @typescript-eslint/no-unused-vars
Line 44:10: 'zoom' is assigned a value but never used @typescript-eslint/no-unused-vars
src/components/Form/Form.tsx
Line 5:3: 'DropdownItemProps' is defined but never used @typescript-eslint/no-unused-vars
src/components/RegionSelector/RegionSelector.tsx
Line 35:6: React Hook useCallback has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useCallback call and refer to those specific props inside useCallback react-hooks/exhaustive-deps
src/pages/Pingers/Pingers.tsx
Line 1:33: 'gql' is defined but never used @typescript-eslint/no-unused-vars
Line 134:5: React Hook useCallback has missing dependencies: 'pinger.id' and 'pinger.unsubscribe_key'. Either include them or remove the dependency array react-hooks/exhaustive-deps
Line 196:12: React Hook React.useCallback has missing dependencies: 'onUnsubscribe' and 'unsubscribePinger'. Either include them or remove the dependency array react-hooks/exhaustive-deps
@MatissJanis this might have slipped through your notifications. PR I think is ready for you to check 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
052d068
to
410f473
Compare
410f473
to
ee81069
Compare
@MatissJanis fixed and updated apollo/client functionality, otherwise I couldn't use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for adding this!
To be investigated, seems like BE is not removing pingerAdd ability to delete pinger from individual pinger page (? not sure if necessary)lets do this in another PRto test use:
http:https://localhost:3000/#/pingers/<id>,<unsubscribe_key>
#1