fix: get tariff, update publication

This commit is contained in:
Nastya 2024-07-17 01:18:52 +03:00
parent 4d1074559b
commit 7d7bc941fa
3 changed files with 36 additions and 8 deletions

@ -7,7 +7,7 @@
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@frontend/kitui": "^1.0.82",
"@frontend/squzanswerer": "^1.0.51",
"@frontend/squzanswerer": "^1.0.53",
"@mui/icons-material": "^5.10.14",
"@mui/material": "^5.10.14",
"@mui/x-charts": "^6.19.5",

@ -65,7 +65,8 @@ function TariffPage() {
const getTariffsList = async (): Promise<Tariff[]> => {
const tariffsList: Tariff[] = [];
const [tariffsResponse, tariffsResponseError] = await getTariffs(1);
let page = 2
const [tariffsResponse, tariffsResponseError] = await getTariffs(page - 1);
if (tariffsResponseError || !tariffsResponse) {
return tariffsList;
@ -73,7 +74,7 @@ function TariffPage() {
tariffsList.push(...tariffsResponse.tariffs);
for (let page = 0; page <= tariffsResponse.totalPages; page += 1) {
for (page; page <= tariffsResponse.totalPages; page += 1) {
const [tariffsResult] = await getTariffs(page);
if (tariffsResult) {

@ -1521,10 +1521,10 @@
immer "^10.0.2"
reconnecting-eventsource "^1.6.2"
"@frontend/squzanswerer@^1.0.51":
version "1.0.51"
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/@frontend/squzanswerer/-/@frontend/squzanswerer-1.0.51.tgz#54c451750aea6ed83b28ef26a613a6addb25cc64"
integrity sha1-VMRRdQrqbtg7KO8mphOmrdslzGQ=
"@frontend/squzanswerer@^1.0.53":
version "1.0.53"
resolved "https://penahub.gitlab.yandexcloud.net/api/v4/projects/43/packages/npm/@frontend/squzanswerer/-/@frontend/squzanswerer-1.0.53.tgz#9e2028c23f0c05da55039d654dfabd32fc13dfb3"
integrity sha1-niAowj8MBdpVA51lTfq9MvwT37M=
dependencies:
bowser "1.9.4"
country-flag-emoji-polyfill "^0.1.8"
@ -1532,6 +1532,7 @@
hex-rgb "^5.0.0"
mobile-detect "^1.4.5"
mui-tel-input "^5.1.2"
react-helmet-async "^2.0.5"
react-imask "^7.6.0"
react-phone-number-input "^3.4.1"
@ -6597,6 +6598,13 @@ internal-slot@^1.0.4, internal-slot@^1.0.7:
resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009"
integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==
invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
dependencies:
loose-envify "^1.0.0"
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
@ -7961,7 +7969,7 @@ log-update@^6.0.0:
strip-ansi "^7.1.0"
wrap-ansi "^9.0.0"
loose-envify@^1.1.0, loose-envify@^1.4.0:
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@ -9587,6 +9595,20 @@ react-fast-compare@^2.0.1:
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==
react-fast-compare@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.2.tgz#929a97a532304ce9fee4bcae44234f1ce2c21d49"
integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==
react-helmet-async@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-2.0.5.tgz#cfc70cd7bb32df7883a8ed55502a1513747223ec"
integrity sha512-rYUYHeus+i27MvFE+Jaa4WsyBKGkL6qVgbJvSBoX8mbsWoABJXdEO0bZyi0F6i+4f0NuIb8AvqPMj3iXFHkMwg==
dependencies:
invariant "^2.2.4"
react-fast-compare "^3.2.2"
shallowequal "^1.1.0"
react-image-crop@^10.1.5:
version "10.1.8"
resolved "https://registry.yarnpkg.com/react-image-crop/-/react-image-crop-10.1.8.tgz#6f7b33d069f6cfb887e66faee16a9fb2e6d31137"
@ -10288,6 +10310,11 @@ shallow-clone@^3.0.0:
dependencies:
kind-of "^6.0.2"
shallowequal@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"