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

properly clears data #61

Merged
merged 1 commit into from
Feb 21, 2025
Merged

properly clears data #61

merged 1 commit into from
Feb 21, 2025

Conversation

saturnaliam
Copy link
Member

created a new page (just shows a loading icon) that saves the match data and clears the current match. the new page makes the code a lot simpler and nicer for clearing it :]

Copy link
Member

@nkalupahana nkalupahana left a comment

Choose a reason for hiding this comment

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

This could also be accomplished by creating an isSubmitting state variable on the review page. You can set it to true when the button is clicked, which does conditional rendering on the loader and has a useEffect with isSubmitting as a dependency that runs the function and then does navigation. However, I suppose this works too.

@saturnaliam saturnaliam merged commit 09e3858 into master Feb 21, 2025
2 checks passed
@saturnaliam saturnaliam deleted the data-clear branch February 21, 2025 22:21
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.

2 participants