Skip to content

Commit d9eba34

Browse files
author
Andrés Blanco
committed
reuse progress circle
1 parent 915fd42 commit d9eba34

File tree

1 file changed

+11
-16
lines changed
  • client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions

1 file changed

+11
-16
lines changed

client/landing/stepper/declarative-flow/internals/steps-repository/site-migration-instructions/index.tsx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,20 @@ const SiteMigrationInstructions: StepType< {
177177
navigation.submit?.( { how: HOW_TO_MIGRATE_OPTIONS.DO_IT_FOR_ME } );
178178
}, [ navigation ] );
179179

180+
const progressCircle = (
181+
<CircularProgressBar
182+
size={ 40 }
183+
enableDesktopScaling
184+
numberOfSteps={ steps.length }
185+
currentStep={ completedSteps }
186+
/>
187+
);
188+
180189
const migrationInstructions = (
181190
<MigrationInstructions
182191
withPreview={ withPreview }
183192
isContainerV2={ useContainerV2 }
184-
progress={
185-
<CircularProgressBar
186-
size={ 40 }
187-
enableDesktopScaling
188-
numberOfSteps={ steps.length }
189-
currentStep={ completedSteps }
190-
/>
191-
}
193+
progress={ progressCircle }
192194
>
193195
<div className="site-migration-instructions__steps">
194196
<Steps steps={ steps } />
@@ -213,14 +215,7 @@ const SiteMigrationInstructions: StepType< {
213215
const topBar = (
214216
<Step.TopBar rightElement={ <SupportNudge onAskForHelp={ navigateToDoItForMe } /> } />
215217
);
216-
const progressCircle = (
217-
<CircularProgressBar
218-
size={ 40 }
219-
enableDesktopScaling
220-
numberOfSteps={ steps.length }
221-
currentStep={ completedSteps }
222-
/>
223-
);
218+
224219
if ( ! withPreview ) {
225220
return (
226221
<>

0 commit comments

Comments
 (0)