Skip to content

Feature/redeem endpoint#1554

Merged
mariahosfeld merged 23 commits into
developfrom
feature/redeem_endpoint
Oct 4, 2022
Merged

Feature/redeem endpoint#1554
mariahosfeld merged 23 commits into
developfrom
feature/redeem_endpoint

Conversation

@sunilsabatp

@sunilsabatp sunilsabatp commented Aug 18, 2022

Copy link
Copy Markdown
Contributor

to do : change reedem end-point

previous endpoint : https://app-staging.plant-for-the-planet.org/api/v1.3/de/validateCode

change to : https://app.plant-for-the-planet.org/app/redeem

steps : 1. go to /profile
2. click on redeem and enter redeem code
3. click on validate code

@vercel

vercel Bot commented Aug 18, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
planet-webapp ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 7:15AM (UTC)

@sagararyal

sagararyal commented Aug 18, 2022

Copy link
Copy Markdown
Member

@mariahosfeld

Copy link
Copy Markdown
Contributor

Receiving "Clientside-exception" error message after logging in.

@mariahosfeld

Copy link
Copy Markdown
Contributor

Function works for me, please change the following thing:

  • Change text on button from "Validate Code" to "Redeem Code"

@mariahosfeld

Copy link
Copy Markdown
Contributor

Functionality works for me

@mohitb35

This comment was marked as resolved.

Comment thread public/static/locales/en/me.json Outdated
Comment thread src/features/user/Profile/components/RedeemModal.tsx Outdated
@@ -103,7 +101,7 @@ export default function RedeemModal({
async function redeemCode() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not used any more, and can be removed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please remove this completely, don't leave it commented. If you need to go back to check it out, version control holds the history of the file.

<div className={styles.codeTreeCount}>
<div
className={styles.codeTreeCount}
style={{ fontSize: '2rem' }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Avoid using inline styles (esp. if there's already a class defined).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure

Comment thread src/features/user/Profile/components/RedeemModal.tsx Outdated
Comment thread pages/claim/[type]/[code].tsx Outdated
@mohitb35

Copy link
Copy Markdown
Member

The layout is not consistent across the 3 different states of the modal: input form, invalid/used code, success.

Screenshot 2022-09-26 at 3 47 23 PM
Screenshot 2022-09-26 at 3 47 30 PM
Screenshot 2022-09-26 at 3 47 39 PM

- remove unused state variables and console logs
- remove extra line spacing
- add return type for functional component

@mohitb35 mohitb35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@sunilsabatp Have requested minor changes. Once done, this is good to go.

Comment thread src/features/user/Profile/styles/RedeemModal.module.scss Outdated
Comment thread src/features/user/Profile/components/RedeemModal.tsx Outdated
@mohitb35

Copy link
Copy Markdown
Member

Looks good to me.

@mohitb35 mohitb35 removed the request for review from Shreyaschorge September 29, 2022 07:22
});
}
}
// async function redeemCode(code: any, type: any) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can remove unused code. We have git if we want to retrieve it again.

@mariahosfeld mariahosfeld merged commit b767573 into develop Oct 4, 2022
@mariahosfeld mariahosfeld deleted the feature/redeem_endpoint branch October 4, 2022 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle 500 status codes: TypeError: Cannot read property 'status' of undefined

5 participants