diff --git a/login-workflow/example/src/screens/demo-components/CreateNewOrgScreenBaseDemo.tsx b/login-workflow/example/src/screens/demo-components/CreateNewOrgScreenBaseDemo.tsx index 57fbe625..ac64e5d1 100644 --- a/login-workflow/example/src/screens/demo-components/CreateNewOrgScreenBaseDemo.tsx +++ b/login-workflow/example/src/screens/demo-components/CreateNewOrgScreenBaseDemo.tsx @@ -6,12 +6,9 @@ export const CreateNewOrgScreenBaseDemo: React.FC = () => ( WorkflowCardHeaderProps={{ title: 'Create An Organization' }} WorkflowCardInstructionProps={{ instructions: - 'Enter your organization name to continue with account creation. Fields marked with an (*) are required.', + 'Enter your organization name to continue with account creation.', }} orgNameLabel="Organization Name" - orgNameTextFieldProps={{ - required: true, - }} orgNameValidator={(orgName: string): boolean | string => { if (orgName?.length > 0) { return true; diff --git a/login-workflow/src/screens/CreateNewOrgScreen/CreateNewOrgScreenBase.tsx b/login-workflow/src/screens/CreateNewOrgScreen/CreateNewOrgScreenBase.tsx index 503c89df..87341791 100644 --- a/login-workflow/src/screens/CreateNewOrgScreen/CreateNewOrgScreenBase.tsx +++ b/login-workflow/src/screens/CreateNewOrgScreen/CreateNewOrgScreenBase.tsx @@ -1,12 +1,14 @@ import React, { useCallback, useEffect } from 'react'; import { CreateNewOrgScreenProps } from './types'; -import { WorkflowCard } from '../../components/WorkflowCard'; -import { WorkflowCardActions } from '../../components/WorkflowCard/WorkflowCardActions'; -import { WorkflowCardBody } from '../../components/WorkflowCard/WorkflowCardBody'; -import { WorkflowCardHeader } from '../../components/WorkflowCard/WorkflowCardHeader'; -import { WorkflowCardInstructions } from '../../components/WorkflowCard/WorkflowCardInstructions'; import TextField from '@mui/material/TextField'; import ErrorManager from '../../components/Error/ErrorManager'; +import { + WorkflowCard, + WorkflowCardHeader, + WorkflowCardInstructions, + WorkflowCardBody, + WorkflowCardActions, +} from '../../components'; /** * Component that renders a screen for the user to enter an organization name to start the @@ -83,8 +85,7 @@ export const CreateNewOrgScreenBase: React.FC { - // eslint-disable-next-line no-unused-expressions - orgNameTextFieldProps?.onChange && orgNameTextFieldProps.onChange(e); + orgNameTextFieldProps?.onChange?.(e); handleOrgNameInputChange(e.target.value); }} onKeyUp={(e): void => { @@ -95,8 +96,7 @@ export const CreateNewOrgScreenBase: React.FC { - // eslint-disable-next-line no-unused-expressions - orgNameTextFieldProps?.onBlur && orgNameTextFieldProps.onBlur(e); + orgNameTextFieldProps?.onBlur?.(e); setShouldValidateOrgName(true); }} /> @@ -105,7 +105,7 @@ export const CreateNewOrgScreenBase: React.FC 0 && isOrgNameValid && actionsProps.canGoNext) as any} - > + /> ); };