chore: name field is hidden when empty name is received from invite details api (#1036)

This commit is contained in:
palash-signoz 2022-05-03 21:19:35 +05:30 committed by GitHub
parent d9cf9071d3
commit 63693a4185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,11 @@ function SignUp({ version }: SignUpProps): JSX.Element {
setFunction(value); setFunction(value);
}; };
const getIsNameVisible = (): boolean =>
!(firstName.length === 0 && !isPreferenceVisible);
const isNameVisible = getIsNameVisible();
return ( return (
<WelcomeLeftContainer version={version}> <WelcomeLeftContainer version={version}>
<FormWrapper> <FormWrapper>
@ -194,6 +199,7 @@ function SignUp({ version }: SignUpProps): JSX.Element {
/> />
</div> </div>
{isNameVisible && (
<div> <div>
<Label htmlFor="signupFirstName">First Name</Label> <Label htmlFor="signupFirstName">First Name</Label>
<Input <Input
@ -207,6 +213,8 @@ function SignUp({ version }: SignUpProps): JSX.Element {
disabled={isDetailsDisable} disabled={isDetailsDisable}
/> />
</div> </div>
)}
<div> <div>
<Label htmlFor="organizationName">Organization Name</Label> <Label htmlFor="organizationName">Organization Name</Label>
<Input <Input