Skip to content

Commit e8f0477

Browse files
committed
fixup! ✨(frontend) add onboarding modal with help menu button
1 parent f23e19f commit e8f0477

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

src/frontend/apps/impress/src/features/on-boarding/components/OnBoarding.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export const OnBoarding = ({
6565
onComplete,
6666
onSkip,
6767
footerLink,
68-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- ModalSize from ui-kit
6968
size = ModalSize.LARGE,
7069
}: OnBoardingProps) => {
7170
const { t } = useTranslation();

src/frontend/apps/impress/src/features/on-boarding/components/OnboardingStepImage.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/frontend/apps/impress/src/features/on-boarding/hooks/useOnboardingSteps.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { type OnboardingStep } from '@gouvfr-lasuite/ui-kit';
2+
import Image from 'next/image';
23
import { useMemo } from 'react';
34
import { useTranslation } from 'react-i18next';
45

@@ -9,7 +10,6 @@ import FileShareIcon from '../assets/file-share.svg';
910
import FormatTextIcon from '../assets/format-text.svg';
1011
import StackTemplateIcon from '../assets/stack-template.svg';
1112
import { OnboardingStepIcon } from '../components/OnboardingStepIcon';
12-
import { OnboardingStepImage } from '../components/OnboardingStepImage';
1313

1414
export interface OnboardingStepsData {
1515
steps: OnboardingStep[];
@@ -41,12 +41,16 @@ export const useOnboardingSteps = () => {
4141
'Move, duplicate, and transform your texts, headings, lists, images without breaking your layout.',
4242
),
4343
content: (
44-
<OnboardingStepImage
44+
<Image
4545
src={t('src_img_onboarding_step_1', {
4646
desc: 'URL of onboarding step 1 preview image',
4747
defaultValue: '/assets/on-boarding/step_1_EN.gif',
4848
})}
4949
alt={t('Compose your doc easily')}
50+
width={350}
51+
height={350}
52+
priority
53+
unoptimized
5054
/>
5155
),
5256
},
@@ -66,12 +70,16 @@ export const useOnboardingSteps = () => {
6670
'Apply styles, structure, and emphasis in one click—keep documents clean, consistent, and easy to scan.',
6771
),
6872
content: (
69-
<OnboardingStepImage
73+
<Image
7074
src={t('src_img_onboarding_step_2', {
7175
desc: 'URL of onboarding step 2 preview image',
7276
defaultValue: '/assets/on-boarding/step_2_EN.gif',
7377
})}
7478
alt={t('Format your content with the toolbar')}
79+
width={350}
80+
height={350}
81+
priority
82+
unoptimized
7583
/>
7684
),
7785
},
@@ -91,12 +99,16 @@ export const useOnboardingSteps = () => {
9199
'Decide exactly who can view, comment, edit—or simply use shareable links.',
92100
),
93101
content: (
94-
<OnboardingStepImage
102+
<Image
95103
src={t('src_img_onboarding_step_3', {
96104
desc: 'URL of onboarding step 3 preview image',
97105
defaultValue: '/assets/on-boarding/step_3_EN.png',
98106
})}
99107
alt={t('Share and collaborate with ease')}
108+
width={350}
109+
height={350}
110+
priority
111+
unoptimized
100112
/>
101113
),
102114
},
@@ -116,12 +128,16 @@ export const useOnboardingSteps = () => {
116128
'Start from ready-made templates for common use cases, then customize them to match your workflow in minutes.',
117129
),
118130
content: (
119-
<OnboardingStepImage
131+
<Image
120132
src={t('src_img_onboarding_step_4', {
121133
desc: 'URL of onboarding step 4 preview image',
122134
defaultValue: '/assets/on-boarding/step_4_EN.png',
123135
})}
124136
alt={t('Draw inspiration from the content library')}
137+
width={350}
138+
height={350}
139+
priority
140+
unoptimized
125141
/>
126142
),
127143
},

0 commit comments

Comments
 (0)