chore: Onboarding path service plus redirects (#24679)

* i18n

* WIP icon stuff

* More icon work

* More gradient tuning

* Mvoe plan-icon to planicon.tsx

* Fix cubic suggestion

* Fix darkmode icon and gradients

* Fix type error

* Onboarding path service

* Update usages of onboarding path and getting started hook
This commit is contained in:
sean-brydon authored and GitHub committed 2025-10-28 11:10:25 +00:00
1 parent 3418a25a85
commit fa884e8516
10 files changed
+72 -16

No files matched your search

@@ -0,0 +1,24 @@
import { FeaturesRepository } from "@calcom/features/flags/features.repository";
import type { PrismaClient } from "@calcom/prisma";
export class OnboardingPathService {
static async getGettingStartedPath(prisma: PrismaClient): Promise<string> {
const featuresRepository = new FeaturesRepository(prisma);
const onboardingV3Enabled = await featuresRepository.checkIfFeatureIsEnabledGlobally("onboarding-v3");
return onboardingV3Enabled ? "/onboarding/getting-started" : "/getting-started";
}
static async getGettingStartedPathWithParams(
prisma: PrismaClient,
queryParams?: Record<string, string>
): Promise<string> {
const basePath = await OnboardingPathService.getGettingStartedPath(prisma);
if (!queryParams || Object.keys(queryParams).length === 0) {
return basePath;
}
const params = new URLSearchParams(queryParams);
return `${basePath}?${params.toString()}`;
}
}