Fix prisma client bundle makes app slow (#2237)
Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
parent
91f13122eb
commit
7716b4c15f
6 changed files with 6 additions and 10 deletions
|
@ -1,5 +1,6 @@
|
|||
import { UserRemoveIcon, PencilIcon } from "@heroicons/react/outline";
|
||||
import { ClockIcon, ExternalLinkIcon, DotsHorizontalIcon } from "@heroicons/react/solid";
|
||||
import { MembershipRole } from "@prisma/client";
|
||||
import Link from "next/link";
|
||||
import React, { useState } from "react";
|
||||
|
||||
|
@ -25,7 +26,6 @@ import ModalContainer from "@components/ui/ModalContainer";
|
|||
|
||||
import MemberChangeRoleModal from "./MemberChangeRoleModal";
|
||||
import TeamPill, { TeamRole } from "./TeamPill";
|
||||
import { MembershipRole } from ".prisma/client";
|
||||
|
||||
interface Props {
|
||||
team: inferQueryOutput<"viewer.teams.get">;
|
||||
|
|
|
@ -6,6 +6,7 @@ import {
|
|||
DotsHorizontalIcon,
|
||||
PencilIcon,
|
||||
} from "@heroicons/react/solid";
|
||||
import { MembershipRole } from "@prisma/client";
|
||||
import Link from "next/link";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
@ -28,7 +29,6 @@ import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogCont
|
|||
import Avatar from "@components/ui/Avatar";
|
||||
|
||||
import { TeamRole } from "./TeamPill";
|
||||
import { MembershipRole } from ".prisma/client";
|
||||
|
||||
interface Props {
|
||||
team: inferQueryOutput<"viewer.teams.list">[number];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { ClockIcon, ExternalLinkIcon, LinkIcon, LogoutIcon, TrashIcon } from "@heroicons/react/solid";
|
||||
import { MembershipRole } from "@prisma/client";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import React from "react";
|
||||
|
@ -14,8 +15,6 @@ import ConfirmationDialogContent from "@components/dialog/ConfirmationDialogCont
|
|||
import CreateEventTypeButton from "@components/eventtype/CreateEventType";
|
||||
import LinkIconButton from "@components/ui/LinkIconButton";
|
||||
|
||||
import { MembershipRole } from ".prisma/client";
|
||||
|
||||
export default function TeamSettingsRightSidebar(props: { team: TeamWithMembers; role: MembershipRole }) {
|
||||
const { t } = useLocale();
|
||||
const utils = trpc.useContext();
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { IdentityProvider } from "@prisma/client";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { hashPassword } from "@lib/auth";
|
||||
import prisma from "@lib/prisma";
|
||||
import slugify from "@lib/slugify";
|
||||
|
||||
import { IdentityProvider } from ".prisma/client";
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (req.method !== "POST") {
|
||||
return;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { IdentityProvider } from "@prisma/client";
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import { authenticator } from "otplib";
|
||||
import qrcode from "qrcode";
|
||||
|
@ -6,8 +7,6 @@ import { ErrorCode, getSession, verifyPassword } from "@lib/auth";
|
|||
import { symmetricEncrypt } from "@lib/crypto";
|
||||
import prisma from "@lib/prisma";
|
||||
|
||||
import { IdentityProvider } from ".prisma/client";
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).json({ message: "Method not allowed" });
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { IdentityProvider } from "@prisma/client";
|
||||
import React from "react";
|
||||
|
||||
import SAMLConfiguration from "@ee/components/saml/Configuration";
|
||||
|
@ -11,8 +12,6 @@ import Shell from "@components/Shell";
|
|||
import ChangePasswordSection from "@components/security/ChangePasswordSection";
|
||||
import TwoFactorAuthSection from "@components/security/TwoFactorAuthSection";
|
||||
|
||||
import { IdentityProvider } from ".prisma/client";
|
||||
|
||||
export default function Security() {
|
||||
const user = trpc.useQuery(["viewer.me"]).data;
|
||||
const { t } = useLocale();
|
||||
|
|
Loading…
Reference in a new issue