mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-13 11:19:52 +03:00
optimizations
This commit is contained in:
@@ -13,7 +13,7 @@ import { LayoutContext } from './context';
|
||||
|
||||
export const DRAWER_WIDTH = 210;
|
||||
|
||||
const Layout: FC<RequiredChildrenProps> = memo(({ children }) => {
|
||||
const LayoutComponent: FC<RequiredChildrenProps> = ({ children }) => {
|
||||
const [mobileOpen, setMobileOpen] = useState(false);
|
||||
const [title, setTitle] = useState(PROJECT_NAME);
|
||||
const { pathname } = useLocation();
|
||||
@@ -41,6 +41,8 @@ const Layout: FC<RequiredChildrenProps> = memo(({ children }) => {
|
||||
</Box>
|
||||
</LayoutContext.Provider>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const Layout = memo(LayoutComponent);
|
||||
|
||||
export default Layout;
|
||||
|
||||
Reference in New Issue
Block a user