perf: add React.memo to hot-path components

This commit is contained in:
Kirill
2026-05-24 19:44:50 +05:00
parent d7e355dc78
commit c9342f833b
4 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react'
import React from 'react'
import AppBar from '@mui/material/AppBar'
import Badge from '@mui/material/Badge'
import Box from '@mui/material/Box'
@@ -30,7 +31,7 @@ type NavItem = { label: string; to: string }
const navItems: NavItem[] = [{ label: 'Каталог', to: '/' }]
export function AppHeader() {
export const AppHeader = React.memo(function AppHeader() {
const { mode, resolvedMode, scheme, setScheme, cycleMode } = useThemeController()
const user = useUnit($user)
const navigate = useNavigate()