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

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

@@ -1,5 +1,5 @@
import {decodeToken, isExpired} from "react-jwt";
import {requests} from "../requests";
import {requests} from "../../requests";
import axios from "axios";
class TokenUtil {

View File

@@ -1,7 +1,7 @@
import axios from "axios";
import {tokenUtil} from "../TokenUtil";
import {tokenUtil} from "./TokenUtil";
const host = "localhost:8081"; //дебаг вместе с беком
const host = "localhost:8080"; //дебаг вместе с беком
// const host = "192.168.1.100:8091"; //дебаг фронта
// const host = "bar.kayashov.keenetic.pro"; //прод
export const api = () => {

View File

@@ -1,25 +0,0 @@
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;
}

View File

@@ -1,18 +0,0 @@
export const sliceData = (rows, page, elementOnPage) => {
if (!rows || rows.length === 0) {
return [];
}
const maxPage = Math.ceil(rows.length / elementOnPage);
// const start = (page - 1) * elementOnPage;
const start = 0;
console.log(maxPage, start)
let end;
if (page === maxPage) {
end = rows.length;
} else {
end = start + elementOnPage;
}
return rows.slice(start, end);
}