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

dApp: Acre points UI #704

Merged
merged 66 commits into from
Oct 18, 2024
Merged

dApp: Acre points UI #704

merged 66 commits into from
Oct 18, 2024

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Aug 13, 2024

Ref: #722

Overview:

  • AcrePointsCard component
  • AcrePointsClaimModal component
  • Data refetching
  • Feature flag

Screenshots:

image image image
Screen.Recording.2024-09-12.at.16.38.39.mov

Added `Countdown` component, adjusted `Button` styles and mocked
`useAcrePoints` hook
Changed width, added links, moved `CardButton` component to shared.
@kpyszkowski kpyszkowski self-assigned this Aug 13, 2024
@kpyszkowski kpyszkowski marked this pull request as draft August 13, 2024 16:41
Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 2be0e39
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/6712471bd0a692000850c875
😎 Deploy Preview https://deploy-preview-704--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit 2be0e39
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp/deploys/6712471b3ff2770007862b71
😎 Deploy Preview https://deploy-preview-704--acre-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kpyszkowski kpyszkowski marked this pull request as ready for review September 12, 2024 13:37
{/* TODO: Update `ButtonLink` component and 'link' Button theme variant */}
<Button
as={Link}
href={`${EXTERNAL_HREF.DOCS}/acre-points-program`}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to create a separate const value for this link.
src/constants/externalHref.ts

export const EXTERNAL_HREF = {
  ACRE_POINTS_DOCS: "https://docs.acre.fi/acre-points-program",
  ...
}

r-czajkowski
r-czajkowski previously approved these changes Sep 18, 2024
@pnicjanik
Copy link
Collaborator

pnicjanik commented Sep 18, 2024

Issue 001 - points_balances updating with Unix Timestamp

  • Fixed
  • Tested

ran the same query before & after claiming points...
SELECT * FROM points_balances WHERE user_id = "0x6F1a421573082BE1BEAe22551259D4D793EfD2cE"

column value before claim value after claim
user_id 0x6F1a421573082BE1BEAe22551259D4D793EfD2cE 0x6F1a421573082BE1BEAe22551259D4D793EfD2cE
unclaimed 173078298 0
calculated_at 2024-09-18 00:00:07 1726689620
claimed 0 173078298
claimed_at null 1726689620

note calculated_at was initially stored as YYYY-MM-DD hh:mm:ss, but after claiming, stored as Unix timestamp

Can see other occurrences by querying SELECT * FROM points_balances

@pnicjanik
Copy link
Collaborator

testing completed on preview-704 w/ no issues to report.

@kpyszkowski kpyszkowski force-pushed the acre-points-ui branch 2 times, most recently from 1e828bc to 3fe2b12 Compare October 17, 2024 10:45
kkosiorowska
kkosiorowska previously approved these changes Oct 18, 2024
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

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

Overall, it looks good and seems to work well. I think it would be a good idea to make sure on Monday that the value of the points is being displayed and calculated correctly.

dapp/src/components/AcrePointsClaimModal.tsx Show resolved Hide resolved
dapp/src/components/AcrePointsClaimModal.tsx Show resolved Hide resolved
@kkosiorowska kkosiorowska merged commit b901071 into main Oct 18, 2024
28 checks passed
@kkosiorowska kkosiorowska deleted the acre-points-ui branch October 18, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants