Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix: type error in settings/admin in app router (calcom#12638)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj authored Dec 4, 2023
1 parent d185d7f commit bb7057e
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import Page from "@pages/settings/admin/organizations/index";
import { _generateMetadata } from "app/_utils";

import Page from "@calcom/features/ee/organizations/pages/settings/admin/AdminOrgPage";

export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("organizations"),
(t) => t("orgs_page_description")
);

export default function AppPage() {
// @ts-expect-error FIXME Property 'Component' is incompatible with index signature
return <Page />;
}
export default Page;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Page from "@pages/settings/admin/users/[id]/edit";
import { getServerCaller } from "app/_trpc/serverClient";
import { type Params } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { cookies, headers } from "next/headers";
import { z } from "zod";

import Page from "@calcom/features/ee/users/pages/users-edit-view";
import prisma from "@calcom/prisma";

const userIdSchema = z.object({ id: z.coerce.number() });
Expand Down Expand Up @@ -33,7 +33,4 @@ export const generateMetadata = async ({ params }: { params: Params }) => {
);
};

export default function AppPage() {
// @ts-expect-error FIXME AppProps | undefined' does not satisfy the constraint 'PageProps'
return <Page />;
}
export default Page;
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import Page from "@pages/settings/admin/users/add";
import { _generateMetadata } from "app/_utils";

import Page from "@calcom/features/ee/users/pages/users-add-view";

export const generateMetadata = async () =>
await _generateMetadata(
() => "Add new user",
() => "Here you can add a new user."
);

export default function AppPage() {
// @ts-expect-error FIXME AppProps | undefined' does not satisfy the constraint 'PageProps'
return <Page />;
}
export default Page;
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import Page from "@pages/settings/admin/users/index";
import { _generateMetadata } from "app/_utils";

import Page from "@calcom/features/ee/users/pages/users-listing-view";

export const generateMetadata = async () =>
await _generateMetadata(
() => "Users",
() => "A list of all the users in your account including their name, title, email and role."
);

export default function AppPage() {
// @ts-expect-error FIXME Property 'Component' is incompatible with index signature
return <Page />;
}
export default Page;
2 changes: 0 additions & 2 deletions apps/web/pages/settings/admin/organizations/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use client";

import AdminOrgsPage from "@calcom/features/ee/organizations/pages/settings/admin/AdminOrgPage";

import type { CalPageWrapper } from "@components/PageWrapper";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/settings/admin/users/[id]/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use client";

import UsersEditView from "@calcom/features/ee/users/pages/users-edit-view";

import type { CalPageWrapper } from "@components/PageWrapper";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/settings/admin/users/add.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use client";

import UsersAddView from "@calcom/features/ee/users/pages/users-add-view";

import type { CalPageWrapper } from "@components/PageWrapper";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/settings/admin/users/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use client";

import UsersListingView from "@calcom/features/ee/users/pages/users-listing-view";

import type { CalPageWrapper } from "@components/PageWrapper";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import NoSSR from "@calcom/core/components/NoSSR";
import LicenseRequired from "@calcom/ee/common/components/LicenseRequired";
import { extractDomainFromWebsiteUrl } from "@calcom/ee/organizations/lib/utils";
Expand Down
2 changes: 2 additions & 0 deletions packages/features/ee/users/pages/users-add-view.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { usePathname, useRouter } from "next/navigation";

import { getParserWithGeneric } from "@calcom/prisma/zod-utils";
Expand Down
2 changes: 2 additions & 0 deletions packages/features/ee/users/pages/users-edit-view.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { usePathname, useRouter } from "next/navigation";
import { z } from "zod";

Expand Down
2 changes: 2 additions & 0 deletions packages/features/ee/users/pages/users-listing-view.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import NoSSR from "@calcom/core/components/NoSSR";
import { Button, Meta } from "@calcom/ui";

Expand Down

0 comments on commit bb7057e

Please sign in to comment.