chore: remove deprecated code, Meta & MetaProvider (#19407)
* chore: remove deprecated code Meta, MetaProvider * fix type checks
This commit is contained in:
1 parent
829bb63eb9
commit
c2be796a5b
13 files changed
+14
-169
No files matched your search
+2
-3
@@ -7,7 +7,7 @@ import { z } from "zod";
|
||||
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Button, useMeta, showToast } from "@calcom/ui";
|
||||
import { Button, showToast } from "@calcom/ui";
|
||||
|
||||
import { AttributeForm } from "./AttributesForm";
|
||||
|
||||
@@ -51,7 +51,6 @@ function CreateAttributesPage() {
|
||||
}
|
||||
|
||||
function CreateAttributeHeader(props: { isPending: boolean }) {
|
||||
const { meta } = useMeta();
|
||||
const { t } = useLocale();
|
||||
const formContext = useFormContext<FormValues>();
|
||||
|
||||
@@ -69,7 +68,7 @@ function CreateAttributeHeader(props: { isPending: boolean }) {
|
||||
<span className="sr-only">{t("back_to_attributes")}</span>
|
||||
</Button>
|
||||
<div className="font-cal text-cal flex space-x-1 text-xl font-semibold leading-none">
|
||||
<h1 className="text-emphasis">{meta.title || t("attribute")}</h1>
|
||||
<h1 className="text-emphasis">{t("attribute")}</h1>
|
||||
{watchedTitle && (
|
||||
<>
|
||||
<span className="text-subtle">/</span> <span className="text-emphasis">{watchedTitle}</span>
|
||||
|
||||
+2
-3
@@ -7,7 +7,7 @@ import { z } from "zod";
|
||||
import LicenseRequired from "@calcom/features/ee/common/components/LicenseRequired";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Button, useMeta, showToast } from "@calcom/ui";
|
||||
import { Button, showToast } from "@calcom/ui";
|
||||
|
||||
import { AttributeForm } from "./AttributesForm";
|
||||
|
||||
@@ -73,7 +73,6 @@ function CreateAttributesPage() {
|
||||
}
|
||||
|
||||
function EditAttributeHeader(props: { isPending: boolean }) {
|
||||
const { meta } = useMeta();
|
||||
const { t } = useLocale();
|
||||
const formContext = useFormContext<FormValues>();
|
||||
|
||||
@@ -91,7 +90,7 @@ function EditAttributeHeader(props: { isPending: boolean }) {
|
||||
<span className="sr-only">{t("back_to_attributes")}</span>
|
||||
</Button>
|
||||
<div className="font-cal text-cal flex space-x-1 text-xl font-semibold leading-none">
|
||||
<h1 className="text-emphasis">{meta.title || t("attribute")}</h1>
|
||||
<h1 className="text-emphasis">{t("attribute")}</h1>
|
||||
{watchedTitle && (
|
||||
<>
|
||||
<span className="text-subtle">/</span> <span className="text-emphasis">{watchedTitle}</span>
|
||||
|
||||
@@ -57,7 +57,7 @@ type FormValues = {
|
||||
calVideoLogo: string | null;
|
||||
};
|
||||
|
||||
const SkeletonLoader = ({ title, description }: { title: string; description: string }) => {
|
||||
const SkeletonLoader = () => {
|
||||
return (
|
||||
<SkeletonContainer>
|
||||
<div className="border-subtle space-y-6 rounded-b-xl border border-t-0 px-4 py-8">
|
||||
@@ -101,7 +101,7 @@ const OrgProfileView = () => {
|
||||
);
|
||||
|
||||
if (isPending || !orgBranding || !currentOrganisation) {
|
||||
return <SkeletonLoader title={t("profile")} description={t("profile_org_description")} />;
|
||||
return <SkeletonLoader />;
|
||||
}
|
||||
|
||||
const isOrgAdminOrOwner =
|
||||
|
||||
@@ -4,12 +4,11 @@ import OIDCConnection from "@calcom/features/ee/sso/components/OIDCConnection";
|
||||
import SAMLConnection from "@calcom/features/ee/sso/components/SAMLConnection";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import { Meta, Alert, SkeletonContainer, SkeletonText } from "@calcom/ui";
|
||||
import { Alert, SkeletonContainer, SkeletonText } from "@calcom/ui";
|
||||
|
||||
const SkeletonLoader = ({ title, description }: { title: string; description: string }) => {
|
||||
const SkeletonLoader = () => {
|
||||
return (
|
||||
<SkeletonContainer>
|
||||
<Meta title={title} description={description} borderInShellHeader={true} />
|
||||
<div className="divide-subtle border-subtle space-y-6 rounded-b-xl border border-t-0 px-6 py-4">
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
<SkeletonText className="h-8 w-full" />
|
||||
@@ -25,17 +24,12 @@ export default function SSOConfiguration({ teamId }: { teamId: number | null })
|
||||
const { data: connection, isPending, error } = trpc.viewer.saml.get.useQuery({ teamId });
|
||||
|
||||
if (isPending) {
|
||||
return <SkeletonLoader title={t("sso_configuration")} description={t("sso_configuration_description")} />;
|
||||
return <SkeletonLoader />;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<>
|
||||
<Meta
|
||||
title={t("sso_configuration")}
|
||||
description={t("sso_configuration_description")}
|
||||
borderInShellHeader={true}
|
||||
/>
|
||||
<Alert severity="warning" message={t(error.message)} className="mt-4" />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -14,8 +14,7 @@ const SAMLSSO = () => {
|
||||
const { data, status } = useSession();
|
||||
const org = data?.user.org;
|
||||
|
||||
if (status === "loading")
|
||||
<SkeletonLoader title={t("sso_saml_heading")} description={t("sso_configuration_description_orgs")} />;
|
||||
if (status === "loading") <SkeletonLoader />;
|
||||
|
||||
if (!org) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user