diff --git a/apps/web/pages/auth/setup/index.tsx b/apps/web/pages/auth/setup/index.tsx index 750844682e..dfc472042d 100644 --- a/apps/web/pages/auth/setup/index.tsx +++ b/apps/web/pages/auth/setup/index.tsx @@ -35,7 +35,14 @@ export default function Setup(props: inferSSRProps) { return ( <>
- + t("current_step_of_total", { currentStep, maxSteps })} + />
); diff --git a/packages/ui/v2/core/Stepper.tsx b/packages/ui/v2/core/Stepper.tsx index bcac08f295..387b6ed7ad 100644 --- a/packages/ui/v2/core/Stepper.tsx +++ b/packages/ui/v2/core/Stepper.tsx @@ -1,8 +1,5 @@ -import { TFunction } from "next-i18next"; import Link from "next/link"; -import { useLocale } from "@calcom/lib/hooks/useLocale"; - type DefaultStep = { title: string; }; @@ -12,20 +9,18 @@ function Stepper(props: { step: number; steps: T[]; disableSteps?: boolean; - t?: TFunction; + stepLabel?: (currentStep: number, totalSteps: number) => string; }) { - let { t } = useLocale(); - if (props.t) { - t = props.t; - } - const { href, steps } = props; + const { + href, + steps, + stepLabel = (currentStep, totalSteps) => `Step ${currentStep} of ${totalSteps}`, + } = props; return ( <> {steps.length > 1 && (