Check if user exists before loading the form (#5108)

This commit is contained in:
Rishabh Saxena 2021-06-14 16:32:41 +05:30 committed by GitHub
parent c00cce0b12
commit a2e3496c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ function OnboardingForm() {
const status = useScript(`https://embed.typeform.com/embed.js`);
const currentUser = useSelector(getCurrentUser);
if (status !== ScriptStatus.READY) return null;
if (status !== ScriptStatus.READY || !currentUser) return null;
return (
<TypeformContainer>