From cb28fcbae22189792f233faa3be420ae926c7c80 Mon Sep 17 00:00:00 2001 From: Teodora Zhelyazkova Date: Mon, 24 Jun 2024 14:22:01 +0300 Subject: [PATCH] feat: add remark in the stepper (#1861) --- .../CampaignApplicationForm.tsx | 42 +++++++++++-------- .../CampaignApplicationRemark.tsx | 27 ++++++++++++ 2 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 src/components/client/campaign-application/CampaignApplicationRemark.tsx diff --git a/src/components/client/campaign-application/CampaignApplicationForm.tsx b/src/components/client/campaign-application/CampaignApplicationForm.tsx index d24a6c0d9..3461ee2da 100644 --- a/src/components/client/campaign-application/CampaignApplicationForm.tsx +++ b/src/components/client/campaign-application/CampaignApplicationForm.tsx @@ -10,6 +10,7 @@ import CampaignApplicationOrganizer from './steps/CampaignApplicationOrganizer' import CampaignApplicationDetails from './steps/CampaignApplicationDetails' import CampaignApplication from './steps/CampaignApplication' import CampaignApplicationFormActions from './CampaignApplicationFormActions' +import CampaignApplicationRemark from './CampaignApplicationRemark' import stepsHandler from './helpers/stepsHandler' import { @@ -48,22 +49,29 @@ export default function CampaignApplicationForm() { }, []) return ( - > onSubmit={handleSubmit} initialValues={initialValues}> - }> - {steps.map((step) => ( - - - - ))} - - - - {activeStep < steps.length && steps[activeStep].component} - - - - - - + <> + > onSubmit={handleSubmit} initialValues={initialValues}> + }> + {steps.map((step) => ( + + + + ))} + + + + {activeStep < steps.length && steps[activeStep].component} + + + + + + + {(activeStep === Steps.ORGANIZER || activeStep === Steps.CAMPAIGN) && ( + + )} + ) } diff --git a/src/components/client/campaign-application/CampaignApplicationRemark.tsx b/src/components/client/campaign-application/CampaignApplicationRemark.tsx new file mode 100644 index 000000000..82f95c872 --- /dev/null +++ b/src/components/client/campaign-application/CampaignApplicationRemark.tsx @@ -0,0 +1,27 @@ +import { Typography, Link, styled } from '@mui/material' +import { useTranslation } from 'next-i18next' +import { routes } from 'common/routes' + +const StyledRemark = styled(Typography)(() => ({ + textAlign: 'center', + maxWidth: '80%', + margin: '100px auto', + fontSize: '12px', +})) + +export default function CampaignApplicationRemark() { + const { t } = useTranslation('campaign-application') + + return ( + + {t('remark.part-one')} + + {t('remark.links.terms')} + + {t('remark.part-two')} + + {t('remark.links.faq')} + + + ) +}