Добавлен атрибут картинки для ингредиентов и удален атрибут английского названия
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {decodeToken, isExpired} from "react-jwt";
|
||||
import {requests} from "../requests";
|
||||
import {requests} from "../../requests";
|
||||
import axios from "axios";
|
||||
|
||||
class TokenUtil {
|
||||
@@ -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 = () => {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user