Добавлен атрибут картинки для ингредиентов и удален атрибут английского названия
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
25
front/src/components/navigation/isNavItemActive.js
Normal file
25
front/src/components/navigation/isNavItemActive.js
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user