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

[SALAD-23116] WebApp - Connect demand alerts page #1243

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Maks19
Copy link
Contributor

@Maks19 Maks19 commented Dec 13, 2024

Description: Connect demand alerts page

@Maks19 Maks19 self-assigned this Dec 13, 2024
@Maks19 Maks19 requested a review from a team as a code owner December 13, 2024 01:12
Copy link

Comment on lines 59 to 63
const demandScenario: Record<number, string> = {
0: 'Low Demand',
50: 'Moderate Demand',
80: 'High Demand',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

packages/web-app/src/modules/demand-alerts-views/constants.ts
let's use this const demandScenario to avoid data duplication

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree
Changed

Comment on lines 9 to 12
export const demandScenario = [
{ label: 'High Demand', value: '80' },
{ label: 'Moderate Demand', value: '50' },
{ label: 'Low Demand', value: '0' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const demandScenario = [
{ label: 'High Demand', value: '80' },
{ label: 'Moderate Demand', value: '50' },
{ label: 'Low Demand', value: '0' },
export const demandScenario = {
'80': { label: 'High Demand', value: '80' },
'50': { label: 'Moderate Demand', value: '50' },
'0': { label: 'Low Demand', value: '0' },
}

@Maks19 Maks19 requested a review from vitto-moz December 16, 2024 12:31
Comment on lines +82 to +85
const withCancelSubscriptionSubmitting =
unsubscribeFromDemandAlertStatus === UnsubscribeFromDemandAlertStatus.SUBMITTING &&
isCurrentDemandedSubscriptionId
const withCancelSubscriptionFailure =
Copy link
Contributor

Choose a reason for hiding this comment

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

why not name it just
isCancelSubscriptionSubmitting
isCancelSubscriptionFailure

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