Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
refactor: wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitK-deriv committed Sep 13, 2023
1 parent 5f333a9 commit d2bb168
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/pages/signup-affiliates/components/wizard/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import styled from 'styled-components'
import { WizardProps } from './index'
import Button from 'components/form/button'
import { localize } from 'components/localization'
import { Localize, localize } from 'components/localization'

const StyledFooter = styled.div`
display: flex;
Expand Down Expand Up @@ -59,7 +59,11 @@ const Footer = ({
disabled={disabled}
onClick={() => (max_step === step ? onSubmit() : buttonHandler(ButtonType.Next))}
>
{max_step === step ? localize('_t_Submit_t_') : localize('_t_Next_t_')}
{max_step === step ? (
<Localize translate_text="_t_Submit_t_" />
) : (
<Localize translate_text="_t_Next_t_" />
)}
</Button>
</StyledFooter>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signup-affiliates/components/wizard/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Title = styled.h2`
font-size: 16px;
font-weight: 700;
padding-top: 4px;
color: '#333333';
color: var(--color-black-3);
`

type HeaderProps = {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/signup-affiliates/components/wizard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ const Wizard = ({
))}
</Wrapper>
<Footer
disabled={!next_btn_enabled}
step={step}
setStep={setStep}
max_step={children.length}
setStep={setStep}
setNextBtnEnabled={setNextBtnEnabled}
onSubmit={onSubmit}
disabled={!next_btn_enabled}
/>
</Modal>
<Background />
Expand Down
3 changes: 2 additions & 1 deletion src/pages/signup-affiliates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import AffiliateSignupForm from './components/_signup-form'
import { isBrowser } from 'common/utility'
import { WithIntl } from 'components/localization'
import { Container } from 'components/containers'
import InitialLoader from 'components/elements/dot-loader'
import useWS from 'components/hooks/useWS'
import Link from 'features/components/atoms/link'
import Image from 'features/components/atoms/image'
Expand Down Expand Up @@ -207,7 +208,7 @@ const AffiliateSignup = () => {
setAffiliateAccount={setAffiliateAccount}
setShowWizard={setShowWizard}
/>
<Suspense fallback={<div>Loading</div>}>
<Suspense fallback={<InitialLoader />}>
{show_wizard && (
<WizardComponent
show_wizard={show_wizard}
Expand Down

0 comments on commit d2bb168

Please sign in to comment.