Skip to content

Commit

Permalink
fix: do not show step title if we have single step form
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Nov 2, 2023
1 parent 2eef18d commit 6d6fa37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/theme/layouts/forms/DefaultFormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { SuccessMessage } from "./DefaultFormLayout/SuccessMessage";
import { TermsOfServiceSection } from "./DefaultFormLayout/TermsOfServiceSection";
import { ReCaptchaSection } from "./DefaultFormLayout/ReCaptchaSection";
import { Button } from "./DefaultFormLayout/buttons/Button";

const Wrapper = styled.div`
width: 100%;
padding: 0 5px 5px 5px;
Expand Down Expand Up @@ -92,7 +93,7 @@ const DefaultFormLayout: FormLayoutComponent = ({
<Form onSubmit={submitForm} data={getDefaultValues()}>
{({ submit }) => (
<Wrapper>
<StepTitle>{currentStep?.title}</StepTitle>
{isMultiStepForm && <StepTitle>{currentStep?.title}</StepTitle>}
{fields.map((row, rowIndex) => (
<Row key={rowIndex}>
{row.map(field => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const DefaultFormLayout: FormLayoutComponent = ({
<Form onSubmit={submitForm} data={getDefaultValues()}>
{({ submit }) => (
<Wrapper>
<StepTitle>{currentStep?.title}</StepTitle>
{isMultiStepForm && <StepTitle>{currentStep?.title}</StepTitle>}
{fields.map((row, rowIndex) => (
<Row key={rowIndex}>
{row.map(field => (
Expand Down

0 comments on commit 6d6fa37

Please sign in to comment.