-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: APP-531 create batch form button label missing and other bugs #2583
Conversation
✅ Deploy Preview for terrasos ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
item => item.value.toString() === projectId.toString(), | ||
); | ||
if (isFound) saveProjectOptionSelected(isFound); | ||
}, [projectId, projectOptions, projects, saveProjectOptionSelected]); | ||
// adding projectOptions to dep array would cause infinite re-renders because it's an array, |
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.
fixing bug 2. (see PR description)
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.
Maybe another option could be to memoize projectOptions
here using useMemo
:
const memoizedProjectOptions = useMemo(() => projectOptions, [projectOptions]);
useEffect(() => {
// ...
}, [projectId, saveProjectOptionSelected, memoizedProjectOptions]);
...(project as ProjectInfo), | ||
metadata: projectsMetadata[i], | ||
})); | ||
return projectsLoading |
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.
fixing bug 1.
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@erikalogie @S4mmyb see testing instructions |
@blushi this seems to be working well. After I reloaded on step 2 of the flow and went back to step 1, the metadata I had input disappeared. Is that expected? |
looks like yet another bug, I can have a quick look, else file a separate bug |
item => item.value.toString() === projectId.toString(), | ||
); | ||
if (isFound) saveProjectOptionSelected(isFound); | ||
}, [projectId, projectOptions, projects, saveProjectOptionSelected]); | ||
// adding projectOptions to dep array would cause infinite re-renders because it's an array, |
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.
Maybe another option could be to memoize projectOptions
here using useMemo
:
const memoizedProjectOptions = useMemo(() => projectOptions, [projectOptions]);
useEffect(() => {
// ...
}, [projectId, saveProjectOptionSelected, memoizedProjectOptions]);
@r41ph re: #2583 (comment) I've tried that but for some reason, this doesn't help |
@erikalogie Fixed it here |
LGTM |
1 similar comment
LGTM |
1a8d9b7
to
aaef0a1
Compare
Description
https://regennetwork.atlassian.net/browse/APP-531
While working on this, I also noticed a number of annoying bugs that I've fixed:
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
How to test
From https://deploy-preview-2583--regen-marketplace.netlify.app/
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...