-
-
Notifications
You must be signed in to change notification settings - Fork 658
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: remove playground results flip #4076
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -57,6 +57,7 @@ export const AdvancedPlayground: VFC<{ | |||
const [searchParams, setSearchParams] = useSearchParams(); | |||
const searchParamsLength = Array.from(searchParams.entries()).length; | |||
const { evaluateAdvancedPlayground, loading } = usePlaygroundApi(); | |||
const [hasFormBeenSubmitted, setHasFormBeenSubmitted] = useState(false); |
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.
new variable to store if form was submitted
<ConditionallyRender | ||
condition={ | ||
!Boolean(results) && | ||
!hasFormBeenSubmitted |
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.
this removing flipping effect
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.
This looks good to me! My only question would be if we could use data state to check whether the form has been submitted or not instead of introducing a new state variable, but I'm assuming you've already explored that possibility? But definitely non-blocking. Nice work! 🏆
@thomasheartman You're right. I tried to do it w/o a new state variable but couldn't get it to work as expected. |
About the changes
Before:
After:
Important files
Discussion points