Skip to content

Commit

Permalink
Hide Earned in 24h until calculation fix (Joystream#3181) (Joystrea…
Browse files Browse the repository at this point in the history
…m#3927)

Co-authored-by: Joystream Stats <dev@joystreamstats.live>
  • Loading branch information
2 people authored and XxFlameCatxX committed Jan 14, 2023
1 parent e56ec43 commit 61ebeea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export const MemberRoleToggle = ({ role }: MemberRoleToggleProps) => {
</SidePaneText>
</SidePaneColumn>
</SidePaneRow>
<SidePaneRow>
<SidePaneLabel text="Earned in 24h" />
{/** TODO fix calculation <SidePaneRow>
<SidePaneLabel text="Earned in 7 days" />
<SidePaneColumn>
<SidePaneText>
<TokenValue value={currentDayEarnings} />
</SidePaneText>
</SidePaneColumn>
</SidePaneRow>
</SidePaneRow>**/}
<SidePaneRow>
<SidePaneLabel text="Role account" />
<SidePaneColumn>
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/working-groups/hooks/useWorkerEarnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const useWorkerEarnings = (workerId: string) => {

const currentDayEarnings = data?.rewardPaidEvents
.filter((event) => {
// TODO use rewardPerBlock
const dayAgo = Date.now() - DAY_IN_MILLISECONDS
const eventDate = new Date(event.createdAt).getTime()
return eventDate > dayAgo
Expand Down

0 comments on commit 61ebeea

Please sign in to comment.