chore: [app-router-migration-10] Migrate getting started page (#12776)

* make no-meeting-found page use ssr

* remove-route-groups

* add LayoutHOC

* fix

* fix

* add a/b test flags for apps, workflows, getting-started, settings/teams

* chore: migrate getting-started-page

* fix: move fonts css variables to layout

* chore/implement-ab-test

* Discard changes to .env.example

---------

Co-authored-by: zomars <[email protected]>
This commit is contained in:
DmytroHryshynandzomars authored and GitHub committed 2024-01-05 10:21:11 -07:00
1 parent c44fb074ab
commit ccda3fd71e
3 files changed
+106 -3

No files matched your search

@@ -1,3 +1,5 @@
"use client";
import type { GetServerSidePropsContext } from "next";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import Head from "next/head";
@@ -51,13 +53,18 @@ const stepRouteSchema = z.object({
const OnboardingPage = () => {
const pathname = usePathname();
const params = useParamsWithFallback();
const router = useRouter();
const [user] = trpc.viewer.me.useSuspenseQuery();
const { t } = useLocale();
const result = stepRouteSchema.safeParse(params);
const result = stepRouteSchema.safeParse({
...params,
step: Array.isArray(params.step) ? params.step : [params.step],
});
const currentStep = result.success ? result.data.step[0] : INITIAL_STEP;
const from = result.success ? result.data.from : "";
const headers = [
{
title: `${t("welcome_to_cal_header", { appName: APP_NAME })}`,
@@ -218,7 +225,6 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
return { redirect: { permanent: false, destination: "/event-types" } };
}
const locale = await getLocale(context.req);
return {
props: {
...(await serverSideTranslations(locale, ["common"])),