mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
perf: reduce bundle size by 21% with direct icon imports (#3844)
This commit is contained in:
@ -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">
|
||||
|
Reference in New Issue
Block a user