|
1 | 1 | import { Button } from '@/components/commons/Button'; |
2 | 2 | import { Typography } from '@/components/commons/Typography'; |
| 3 | +import { ResetType } from 'solarxr-protocol'; |
| 4 | +import { ResetButton } from '@/components/home/ResetButton'; |
| 5 | +import { useLocalization } from '@fluent/react'; |
| 6 | +import { useBreakpoint } from '@/hooks/breakpoint'; |
3 | 7 | import { VerticalStepComponentProps } from '@/components/commons/VerticalStepper'; |
4 | | -import { Localized } from '@fluent/react'; |
5 | 8 |
|
6 | 9 | export function VerifyMountingStep({ |
7 | 10 | nextStep, |
8 | 11 | prevStep, |
9 | 12 | }: VerticalStepComponentProps) { |
| 13 | + const { isMobile } = useBreakpoint('mobile'); |
| 14 | + const { l10n } = useLocalization(); |
10 | 15 | return ( |
11 | | - <div className="flex flex-grow flex-col gap-4 py-2"> |
12 | | - <div className="flex flex-col gap-2"> |
13 | | - <Localized id="onboarding-stay_aligned-verify_mounting-step-0"> |
14 | | - <Typography /> |
15 | | - </Localized> |
16 | | - <Localized id="onboarding-stay_aligned-verify_mounting-step-1"> |
17 | | - <Typography /> |
18 | | - </Localized> |
19 | | - <Localized id="onboarding-stay_aligned-verify_mounting-step-2"> |
20 | | - <Typography /> |
21 | | - </Localized> |
22 | | - <Localized id="onboarding-stay_aligned-verify_mounting-step-3"> |
23 | | - <Typography /> |
24 | | - </Localized> |
25 | | - </div> |
26 | | - <div className="flex gap-3 justify-between"> |
27 | | - <Localized id="onboarding-stay_aligned-previous_step"> |
28 | | - <Button variant="secondary" onClick={prevStep} /> |
29 | | - </Localized> |
| 16 | + <div className="flex flex-col flex-grow justify-between py-2 gap-2"> |
| 17 | + <div className="flex flex-col flex-grow"> |
| 18 | + <div className="flex flex-grow flex-col gap-4 max-w-sm"> |
| 19 | + <div className="flex flex-col gap-2"> |
| 20 | + <Typography> |
| 21 | + {l10n.getString( |
| 22 | + 'onboarding-automatic_mounting-mounting_reset-step-0' |
| 23 | + )} |
| 24 | + </Typography> |
| 25 | + <Typography> |
| 26 | + {l10n.getString( |
| 27 | + 'onboarding-automatic_mounting-mounting_reset-step-1' |
| 28 | + )} |
| 29 | + </Typography> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + |
| 33 | + {isMobile && ( |
| 34 | + <div className="flex flex-col items-center fill-background-50 justify-center"> |
| 35 | + <img |
| 36 | + src="/images/mounting-reset-pose.webp" |
| 37 | + width={450} |
| 38 | + alt="mounting reset ski pose" |
| 39 | + /> |
| 40 | + </div> |
| 41 | + )} |
30 | 42 |
|
31 | | - <div className="flex gap-2"> |
32 | | - <Localized id="onboarding-stay_aligned-verify_mounting-redo_mounting"> |
33 | | - <Button |
34 | | - variant={'secondary'} |
35 | | - to="/onboarding/mounting/choose" |
36 | | - state={{ alonePage: true }} |
| 43 | + {!isMobile && ( |
| 44 | + <div className="flex flex-col pt-1 items-center fill-background-50 justify-center"> |
| 45 | + <img |
| 46 | + src="/images/mounting-reset-pose.webp" |
| 47 | + width={600} |
| 48 | + alt="mounting reset ski pose" |
37 | 49 | /> |
38 | | - </Localized> |
39 | | - <Localized id="onboarding-stay_aligned-next_step"> |
40 | | - <Button variant="primary" onClick={nextStep} /> |
41 | | - </Localized> |
| 50 | + </div> |
| 51 | + )} |
| 52 | + <div className="flex gap-3 justify-between"> |
| 53 | + <Button variant={'secondary'} onClick={prevStep}> |
| 54 | + {l10n.getString('onboarding-automatic_mounting-prev_step')} |
| 55 | + </Button> |
| 56 | + <ResetButton |
| 57 | + size="small" |
| 58 | + type={ResetType.Mounting} |
| 59 | + onReseted={nextStep} |
| 60 | + /> |
42 | 61 | </div> |
43 | 62 | </div> |
44 | 63 | </div> |
|
0 commit comments