perf: reduce bundle size by 21% with direct icon imports (#3844)

This commit is contained in:
Michel Heusschen
2024-08-28 16:55:28 +02:00
committed by GitHub
parent d11bd30ec6
commit 2dbf92f7f1
63 changed files with 222 additions and 217 deletions

View File

@ -1,4 +1,5 @@
import { Button, IconButton } from "@mui/joy";
import { ExternalLinkIcon, TrashIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
import { webhookServiceClient } from "@/grpcweb";
@ -6,7 +7,6 @@ import useCurrentUser from "@/hooks/useCurrentUser";
import { Webhook } from "@/types/proto/api/v1/webhook_service";
import { useTranslate } from "@/utils/i18n";
import showCreateWebhookDialog from "../CreateWebhookDialog";
import Icon from "../Icon";
const listWebhooks = async (userId: number) => {
const { webhooks } = await webhookServiceClient.listWebhooks({
@ -88,7 +88,7 @@ const WebhookSection = () => {
handleDeleteWebhook(webhook);
}}
>
<Icon.Trash className="w-4 h-auto" />
<TrashIcon className="w-4 h-auto" />
</IconButton>
</td>
</tr>
@ -113,7 +113,7 @@ const WebhookSection = () => {
target="_blank"
>
{t("common.learn-more")}
<Icon.ExternalLink className="inline w-4 h-auto ml-1" />
<ExternalLinkIcon className="inline w-4 h-auto ml-1" />
</Link>
</div>
</div>