Добавлен атрибут картинки для ингредиентов и удален атрибут английского названия

This commit is contained in:
Kayashov.SM
2025-08-25 14:57:06 +04:00
parent 56f81ea54b
commit 6fe2ca6c57
17 changed files with 15 additions and 42 deletions

View File

@@ -39,6 +39,7 @@ export function UserPopover({anchorEl, onClose, open}) {
} catch (err) {
logger.error('Sign out error', err);
}
// eslint-disable-next-line
}, [checkSession, location]);
return (
@@ -85,7 +86,7 @@ export function UserPopover({anchorEl, onClose, open}) {
}
function userDescriptor(user) {
if(!user) {
if (!user) {
return null;
}
if (!user.name) {

View File

@@ -1,5 +1,5 @@
import Stack from "@mui/material/Stack";
import {isNavItemActive} from "../../lib/isNavItemActive";
import {isNavItemActive} from "./isNavItemActive";
import {navIcons} from "../core/navIcons";
import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";

View File

@@ -0,0 +1,25 @@
export function isNavItemActive({
disabled,
external,
href,
matcher,
pathname,
}) {
if (disabled || !href || external) {
return false;
}
if (matcher) {
if (matcher.type === 'startsWith') {
return pathname.startsWith(matcher.href);
}
if (matcher.type === 'equals') {
return pathname === matcher.href;
}
return false;
}
return pathname === href;
}