Reduce bundle size by importing single icons at a time (#6644)
* Removed barrel import for icons to reduce bundle size. * Fixed replacement mistakes * Reverted unneccesary yarn.lock updates * Added some missed Icon. import conversions * Remove merge artifact import in @calcom/ui * Don't import Icon in pages/[user] * Update packages/ui/package.json Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
155 files changed
+881
-768
No files matched your search
@@ -9,7 +9,8 @@ import React, { AriaRole, ComponentType, Fragment } from "react";
|
||||
|
||||
import { APP_NAME, SUPPORT_MAIL_ADDRESS } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { EmptyScreen, Icon } from "@calcom/ui";
|
||||
import { EmptyScreen } from "@calcom/ui";
|
||||
import { FiAlertTriangle } from "@calcom/ui/components/icon";
|
||||
|
||||
type LicenseRequiredProps = {
|
||||
as?: keyof JSX.IntrinsicElements | "";
|
||||
@@ -35,7 +36,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
|
||||
children
|
||||
) : (
|
||||
<EmptyScreen
|
||||
Icon={Icon.FiAlertTriangle}
|
||||
Icon={FiAlertTriangle}
|
||||
headline={t("enterprise_license")}
|
||||
description={
|
||||
<div
|
||||
|
||||
@@ -4,7 +4,8 @@ import React, { AriaRole, ComponentType, Fragment } from "react";
|
||||
|
||||
import { APP_NAME, CONSOLE_URL, SUPPORT_MAIL_ADDRESS } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { EmptyScreen, Icon } from "@calcom/ui";
|
||||
import { EmptyScreen } from "@calcom/ui";
|
||||
import { FiAlertTriangle } from "@calcom/ui/components/icon";
|
||||
|
||||
type LicenseRequiredProps = {
|
||||
as?: keyof JSX.IntrinsicElements | "";
|
||||
@@ -25,7 +26,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
|
||||
children
|
||||
) : (
|
||||
<EmptyScreen
|
||||
Icon={Icon.FiAlertTriangle}
|
||||
Icon={FiAlertTriangle}
|
||||
headline={t("enterprise_license")}
|
||||
description={
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user