Skip to content

Commit

Permalink
OV-369: + move MAX_PERCENT outside of the component
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano-lacorazza committed Sep 26, 2024
1 parent a6ee73f commit 2874d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/bundles/common/components/stepper/stepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ type Properties = {
currentStep: string;
onClickBack?: () => void;
};
const MAX_PERCENT = 100;

const Stepper: React.FC<Properties> = ({ steps, currentStep, onClickBack }) => {
const activeStepIndex = steps.indexOf(currentStep);
const MAX_PERCENT = 100;

const progressPercent =
(activeStepIndex / (steps.length - 1)) * MAX_PERCENT;

Expand Down

0 comments on commit 2874d6c

Please sign in to comment.