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-23966] [SALAD-23964] WebApp - Add aggregate data type #1269

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

Conversation

Maks19
Copy link
Contributor

@Maks19 Maks19 commented Jan 29, 2025

Description: Add aggregate data type

@Maks19 Maks19 self-assigned this Jan 29, 2025
@Maks19 Maks19 marked this pull request as ready for review January 29, 2025 20:05
@Maks19 Maks19 requested a review from a team as a code owner January 29, 2025 20:05
@Maks19 Maks19 changed the title WebApp - Add aggregate data type [SALAD-23966] [SALAD-23964] WebApp - Add aggregate data type Jan 29, 2025
Copy link

Copy link

@Maks19 Maks19 requested a review from rners01 January 30, 2025 15:45
@@ -69,43 +65,103 @@ interface Props extends WithStyles<typeof styles> {

const EarningHistoryRaw = ({ classes, viewLast24Hours, viewLast7Days, viewLast30Days }: Props) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

filename is EarningHistory.tsx, but we keep EarningHistoryRaw component here, let's make naming aligned

@Maks19 Maks19 requested a review from vitto-moz January 30, 2025 21:35
@Maks19 Maks19 requested a review from vitto-moz February 5, 2025 14:15
vitto-moz
vitto-moz previously approved these changes Feb 6, 2025
},
]

const machineEarnings = isAggregateView ? aggregateMachineEarnings : individualMachineEarnings

const withMachinesData = machines !== null
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
const withMachinesData = machines !== null
const withMachines = machines !== null

Comment on lines 14 to 18
earningsPerMachine: store.balance.earningsPerMachine,
machines: store.balance.machines,
daysShowing: store.balance.getDaysShowingEarnings,
fetchEarningsPerMachine: store.balance.fetchEarningsPerMachine,
...props,
Copy link
Contributor

Choose a reason for hiding this comment

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

to not rewrite

Suggested change
earningsPerMachine: store.balance.earningsPerMachine,
machines: store.balance.machines,
daysShowing: store.balance.getDaysShowingEarnings,
fetchEarningsPerMachine: store.balance.fetchEarningsPerMachine,
...props,
...props,
earningsPerMachine: store.balance.earningsPerMachine,
machines: store.balance.machines,
daysShowing: store.balance.getDaysShowingEarnings,
fetchEarningsPerMachine: store.balance.fetchEarningsPerMachine,```

}, [earningsPerMachine, isAggregateView])

useEffect(() => {
if (Object.values(machineOptions).length > 10) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why specifically 10?
worth moving to the const with explanatory naming?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

@Maks19 Maks19 requested review from vitto-moz and rners01 February 11, 2025 15:09
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