Skip to content

Commit 39ea458

Browse files
author
Ruben van Leeuwen
committed
1936: Minor code improvement
1 parent 9100587 commit 39ea458

File tree

1 file changed

+3
-2
lines changed
  • frontend/packages/pydantic-forms/src/components/form

1 file changed

+3
-2
lines changed

frontend/packages/pydantic-forms/src/components/form/Footer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const Footer = () => {
2323
hasNext,
2424
formInputData,
2525
} = usePydanticFormContext();
26-
const t = useTranslations('footer');
2726

27+
const t = useTranslations('footer');
28+
const submitButtonLabel = sendLabel ?? hasNext ? t('send') : t('submit');
2829
const PreviousButton = () => (
2930
<button
3031
type="button"
@@ -76,7 +77,7 @@ const Footer = () => {
7677
!rhf.formState.isSubmitting)
7778
}
7879
>
79-
{sendLabel ?? hasNext ? t('send') : t('submit')}
80+
{submitButtonLabel}
8081
</button>
8182
);
8283

0 commit comments

Comments
 (0)