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

Make alerts general purpose #72

Merged
merged 5 commits into from
Feb 23, 2024
Merged

Make alerts general purpose #72

merged 5 commits into from
Feb 23, 2024

Conversation

brickpop
Copy link
Contributor

@brickpop brickpop commented Feb 22, 2024

Solves:

  • Follow-up alerts not appearing

Changed:

  • Remove alert not really needed to be exported
  • The UI container didn't need to be on the context root file
  • Using plain alert cards
  • Using the context's logic to manage appearing and expired alerts
  • Making alerts TX independent

Limitation:

  • ODS doesn't allow displaying a description with a link
  • Temporarily, TX hashes are received but not displayed

image

@CLAassistant
Copy link

CLAassistant commented Feb 22, 2024

CLA assistant check
All committers have signed the CLA.

@brickpop
Copy link
Contributor Author

image image


export interface AlertContextProps {
alerts: IAlert[];
addAlert: (message: string, txHash: string) => void;
removeAlert: (id: number) => void;
addAlert: (newAlert: NewAlert) => void;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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

@carlosgj94 carlosgj94 merged commit 5e8ba7a into main Feb 23, 2024
2 checks passed
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.

3 participants