Compare commits

..

1 Commits

Author SHA1 Message Date
d72f666a51 🔧 Refactor for axios upgrade 2023-03-25 16:31:24 -04:00
6 changed files with 24 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
FROM node:18.15.0-alpine
FROM node:17.3-alpine
LABEL maintainer="Rishi Ghan <rishi.ghan@gmail.com>"
WORKDIR /threetwo
@@ -9,11 +9,11 @@ COPY nodemon.json ./
COPY jsdoc.json ./
# RUN apt-get update && apt-get install -y git python3 build-essential autoconf automake g++ libpng-dev make
RUN apk --no-cache add g++ make libpng-dev git python3 libc6-compat autoconf automake libjpeg-turbo-dev libpng-dev mesa-dev mesa libxi build-base gcc libtool nasm
RUN apk --no-cache add g++ make libpng-dev python3 git libc6-compat autoconf automake bash libjpeg-turbo-dev libpng-dev mesa-dev mesa libxi build-base gcc libtool nasm
RUN yarn --ignore-engines
COPY . .
EXPOSE 5173
EXPOSE 3050
ENTRYPOINT [ "npm", "start" ]

View File

@@ -7,7 +7,7 @@
"scripts": {
"build": "vite build",
"dev": "rimraf dist && npm run build && vite",
"start": "npm run build && vite",
"prod": "npm run build && vite",
"docs": "jsdoc -c jsdoc.json",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
@@ -23,7 +23,7 @@
"@fortawesome/fontawesome-free": "^6.3.0",
"@redux-devtools/extension": "^3.2.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@tanstack/react-table": "^8.5.11",
"@tanstack/react-table": "^8.8.0",
"@types/axios": "^0.14.0",
"@types/mime-types": "^2.1.0",
"@types/react-router-dom": "^5.3.3",

View File

@@ -1,6 +1,7 @@
import axios from "axios";
import rateLimiter from "axios-rate-limit";
import { setupCache } from "axios-cache-interceptor";
import qs from "qs";
import {
CV_SEARCH_SUCCESS,
CV_API_CALL_IN_PROGRESS,
@@ -54,6 +55,7 @@ export const comicinfoAPICall = (options) => async (dispatch) => {
type: CV_API_CALL_IN_PROGRESS,
inProgress: true,
});
console.log(options);
const serviceURI = `${COMICVINE_SERVICE_URI}/${options.callURIAction}`;
const response = await http(serviceURI, {
method: options.callMethod,
@@ -63,6 +65,11 @@ export const comicinfoAPICall = (options) => async (dispatch) => {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*",
},
paramsSerializer: {
indexes: null,
},
// (params) =>
// qs.stringify(params, { arrayFormat: "repeat" }),
});
switch (options.callURIAction) {
@@ -77,7 +84,7 @@ export const comicinfoAPICall = (options) => async (dispatch) => {
console.log("Could not complete request.");
}
} catch (error) {
console.log(error);
console.error(error);
dispatch({
type: CV_API_GENERIC_FAILURE,
error,

View File

@@ -20,7 +20,7 @@ export const PullList = ({ issues }: PullListProps): ReactElement => {
useEffect(() => {
dispatch(
getWeeklyPullList({
startDate: "2023-1-25",
startDate: "2023-3-25",
pageSize: "15",
currentPage: "1",
}),

View File

@@ -1,4 +1,4 @@
import React, { useCallback, ReactElement } from "react";
import React, { useMemo, useCallback, ReactElement } from "react";
import { isNil, isEmpty } from "lodash";
import { IExtractedComicBookCoverFile, RootState } from "threetwo-ui-typings";
import { importToDB } from "../actions/fileops.actions";

View File

@@ -3294,17 +3294,17 @@
"@types/express" "^4.7.0"
file-system-cache "^2.0.0"
"@tanstack/react-table@^8.5.11":
version "8.5.11"
resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.5.11.tgz#544f551f15412087edfc2df01bed9697aab4651f"
integrity sha512-bIegBJ3VPUX3Z7rMnFEnTRCRgPccTsciilQA1ib/pA6M7Qq1boTNPjNjSbEHmBKytaxPrPfcUfzkZLogYtvu3g==
"@tanstack/react-table@^8.8.0":
version "8.8.0"
resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.8.0.tgz#f20e1d5b2615bf785adfb727b89dcf55e72cdab8"
integrity sha512-K55peZ4VNRA+Jk/rSI8+0Tj/T9q8SyysmnK08wO/5kgIX3MhGL7wl0858eEcvd/2eq+CPPmhQx9wYoWOWtFEhg==
dependencies:
"@tanstack/table-core" "8.5.11"
"@tanstack/table-core" "8.8.0"
"@tanstack/table-core@8.5.11":
version "8.5.11"
resolved "https://registry.yarnpkg.com/@tanstack/table-core/-/table-core-8.5.11.tgz#a23178a097df4b0b64bdfa6f79e6d8933e97c7f7"
integrity sha512-ZN61ockLaIAiiPbZfMKT2S03nbWx28OHg/nAiDnNfmN4QmAMcdwVajPn2QQwnNVGAr4jS4nbhbYzCcjq8livXQ==
"@tanstack/table-core@8.8.0":
version "8.8.0"
resolved "https://registry.yarnpkg.com/@tanstack/table-core/-/table-core-8.8.0.tgz#7b6db72ea82175495528313513d825e312cbe58b"
integrity sha512-P8Vk9yngfai1GLEfyqtT0b+Dty8subPR8yl5r1z/z4Z8NtaCIL1n+OmMV1QBU8WojeSSsWgr+o1CTxnaaOBoyQ==
"@testing-library/dom@^8.3.0":
version "8.20.0"