-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make alerts general purpose #72
Conversation
67b1395
to
a030d13
Compare
context/AlertContext.tsx
Outdated
|
||
export interface AlertContextProps { | ||
alerts: IAlert[]; | ||
addAlert: (message: string, txHash: string) => void; | ||
removeAlert: (id: number) => void; | ||
addAlert: (newAlert: NewAlert) => void; |
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.
Can't we use only one input here addAlert()
but with a type enum that defaults to info?
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.
We need a fully customizable path and IMO this should be the main function. There are 3 convenience shorthand's, but as you wish
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 think the convenience functions might become problematic if ever aim to change some inputs of the main function.
I think it will be better with only one :D
47c3fa2
to
8d3640b
Compare
Solves:
Changed:
Limitation: