chore: [app-router-migration 19] Migrate `/settings/my-account/*` pages (#13045)

* intuita codemod: app-directory-boilerplate-codemod

* manual: move to (settings-layout) route group

* manual: add title/description metadata

* manual: Change structure & Refactor to make code up to date
This commit is contained in:
Benny Joo 2024-01-11 12:22:44 +00:00 committed by GitHub
parent 070ec326aa
commit 5f14cd31d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/appearance";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("appearance"),
(t) => t("appearance_description")
);
export default Page;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/calendars";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("calendars"),
(t) => t("calendars_description")
);
export default Page;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/conferencing";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("conferencing"),
(t) => t("conferencing_description")
);
export default Page;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/general";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("general"),
(t) => t("general_description")
);
export default Page;

View File

@ -0,0 +1,5 @@
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
export default WithLayout({ getLayout });

View File

@ -0,0 +1,10 @@
import Page from "@pages/settings/my-account/profile";
import { _generateMetadata } from "app/_utils";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("profile"),
(t) => t("profile_description")
);
export default Page;

View File

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { Controller, useForm } from "react-hook-form";
import type { z } from "zod";

View File

@ -1,3 +1,5 @@
"use client";
import { Fragment } from "react";
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";

View File

@ -1,3 +1,5 @@
"use client";
import { useReducer } from "react";
import DisconnectIntegrationModal from "@calcom/features/apps/components/DisconnectIntegrationModal";

View File

@ -1,3 +1,5 @@
"use client";
import { useSession } from "next-auth/react";
import { useState } from "react";
import { Controller, useForm } from "react-hook-form";

View File

@ -1,3 +1,5 @@
"use client";
import { zodResolver } from "@hookform/resolvers/zod";
import { signOut, useSession } from "next-auth/react";
import type { BaseSyntheticEvent } from "react";