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,7 +1,7 @@
import { IconButton } from "@mui/joy";
import { PaperclipIcon } from "lucide-react";
import { useContext, useRef, useState } from "react";
import toast from "react-hot-toast";
import Icon from "@/components/Icon";
import { useResourceStore } from "@/store/v1";
import { Resource } from "@/types/proto/api/v1/resource_service";
import { MemoEditorContext } from "../types";
@ -67,7 +67,7 @@ const UploadResourceButton = () => {
return (
<IconButton size="sm" disabled={state.uploadingFlag}>
<Icon.Paperclip className="w-5 h-5 mx-auto" />
<PaperclipIcon className="w-5 h-5 mx-auto" />
<input
className="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
ref={fileInputRef}