-
Notifications
You must be signed in to change notification settings - Fork 5
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
Integrate unitType
#424
Integrate unitType
#424
Conversation
- marks `unit` as deprecated - updates to `unitType` throughout code
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- only for tree/conservation projects
- this is seen in the Left Panel - Also converts `getAdditionalInfo` into a pure function - Also adds a separate type definition for UnitType
* PC = PlanetCash
- updates planet-sdk to get latest `Donation` type - adapts thank you message and image text for donations with unitType = m2 and purpose = trees
c81230e
to
7048de0
Compare
7048de0
to
ed3b911
Compare
- disables inv. gifts for "trees+m2" donations - enables PC payment only for "unitType: tree" donations
ed3b911
to
3976a99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
donation.destination && donation.units | ||
? " " + | ||
t("common:restorationDonationUsage", { | ||
units: donation.units, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to format donation.units
any more at all in the UI (I know you do not know if this is a number of trees, square meter or amount of currency)? (E.g. in src/Donations/LeftPanel/TransactionSummary.tsx
we also use a function getAdditionalInfo
to format the number depending on the unitType.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for pointing this out. I've fixed it in f01b7e8
Changes
unitType
in Donations Form and Left Panel (Transaction Summary)unitType
in Thank you screen