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 { Drawer, IconButton } from "@mui/joy";
import { MenuIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useLocation } from "react-router-dom";
import Icon from "./Icon";
import Navigation from "./Navigation";
const NavigationDrawer = () => {
@ -23,7 +23,7 @@ const NavigationDrawer = () => {
return (
<>
<IconButton onClick={toggleDrawer(true)}>
<Icon.Menu className="w-5 h-auto dark:text-gray-400" />
<MenuIcon className="w-5 h-auto dark:text-gray-400" />
</IconButton>
<Drawer anchor="left" size="sm" open={open} onClose={toggleDrawer(false)}>
<div className="w-full h-full overflow-auto px-4 bg-zinc-100 dark:bg-zinc-900">