Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrila committed Apr 8, 2024
1 parent 2fdb0fc commit 9fd2565
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/components/ProposalBuilder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const templateAreaTwoCol = '"content details"';
const templateAreaSingleCol = `"content"
"details"`;

export default function ProposalBuilder({ mode, initialValues, prepareProposalData }: IProposalBuilder) {
export default function ProposalBuilder({
mode,
initialValues,
prepareProposalData,
}: IProposalBuilder) {
const [formState, setFormState] = useState(CreateProposalState.METADATA_FORM);
const { t } = useTranslation(['proposalTemplate', 'proposal']);

Expand Down Expand Up @@ -59,17 +63,17 @@ export default function ProposalBuilder({ mode, initialValues, prepareProposalDa
enableReinitialize
onSubmit={async values => {
if (canUserCreateProposal) {
const proposalData = await prepareProposalData(values);
if (proposalData) {
submitProposal({
proposalData,
nonce: values?.nonce,
pendingToastMessage: t('proposalCreatePendingToastMessage', { ns: 'proposal' }),
successToastMessage: t('proposalCreateSuccessToastMessage', { ns: 'proposal' }),
failedToastMessage: t('proposalCreateFailureToastMessage', { ns: 'proposal' }),
successCallback,
});
}
const proposalData = await prepareProposalData(values);
if (proposalData) {
submitProposal({
proposalData,
nonce: values?.nonce,
pendingToastMessage: t('proposalCreatePendingToastMessage', { ns: 'proposal' }),
successToastMessage: t('proposalCreateSuccessToastMessage', { ns: 'proposal' }),
failedToastMessage: t('proposalCreateFailureToastMessage', { ns: 'proposal' }),
successCallback,
});
}
}
}}
>
Expand Down

0 comments on commit 9fd2565

Please sign in to comment.