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

Save donation flow inside sessionStorage #1533

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

sashko9807
Copy link
Member

@sashko9807 sashko9807 commented Aug 1, 2023

Saves the selected values from formik inside sessionStorage, to prevent data loss, on page reload/refresh.
The values are saved until either successful donation has been made, or until the browser tab has been closed.

Closes #1260

Testing

Steps to test

  1. Select campaign, and click Donate buton.
  2. Complete a few donation steps, and reload the page.
  3. The selected values from donation flow, should be saved

Saves the selected values from formik inside sessionStorage. The values are saved until either step 3 of donation has been reached, or until the browser tab has been closed.
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

✅ Tests will run for this PR. Once they succeed it can be merged.

@sashko9807 sashko9807 changed the title one-time-donation: Save donation flow inside sessionStorage Save donation flow inside sessionStorage Aug 1, 2023
@igoychev igoychev added the run tests Allows running the tests workflows for forked repos label Aug 1, 2023
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Aug 1, 2023
values: OneTimeDonation,
step: number,
): DonationSession {
const donationSession = sessionStorage.getItem(PREFIX + campaignSlug)
Copy link
Contributor

Choose a reason for hiding this comment

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

good call to add the campaign slug as key!

Copy link
Contributor

@igoychev igoychev left a comment

Choose a reason for hiding this comment

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

tested the session locally and works well, merging now to test on dev

@igoychev igoychev merged commit fe4fd8a into podkrepi-bg:master Aug 2, 2023
11 of 12 checks passed
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.

[Bug] Login with Google returns user to step 1 again during the donation process.
2 participants