diff --git a/src/components/api-metrics-graph/index.js b/src/components/api-metrics-graph/index.js index 935425b23..a70d316a6 100644 --- a/src/components/api-metrics-graph/index.js +++ b/src/components/api-metrics-graph/index.js @@ -30,11 +30,11 @@ function ApiMetricsGraph({ graph }) { return "⚠️ Error Fetching API Metrics"; } - if (status !== 'succeeded') { + if (status !== 'success') { return null; } - if (status === 'succeeded' && data.heartbeatList["1"] === 0) { + if (status === 'success' && data.heartbeatList["1"] === 0) { return `⚠️ ${t('No data')}`; } diff --git a/src/components/price-graph/index.js b/src/components/price-graph/index.js index ddfbe0354..a4d3af9de 100644 --- a/src/components/price-graph/index.js +++ b/src/components/price-graph/index.js @@ -31,13 +31,13 @@ function PriceGraph({ item, itemId }) { const gameMode = useSelector((state) => state.settings.gameMode); const { status, data } = useQuery( `historical-price-${itemId}`, - `{ - historicalItemPrices(id:"${itemId}", gameMode: ${gameMode}){ + `query TarkovDevHistorical { + historicalItemPrices(id: "${itemId}", gameMode: ${gameMode}) { price priceMin timestamp } - }`, + }`.replace(/\s{2,}/g, ' '), ); const { dayTicks, tickLabels } = useMemo(() => { @@ -45,7 +45,7 @@ function PriceGraph({ item, itemId }) { dayTicks: [], tickLabels: {}, }; - if (status !== 'succeeded' || !data?.data?.historicalItemPrices) { + if (status !== 'success' || !data?.data?.historicalItemPrices) { return returnValues; } returnValues.dayTicks = data.data.historicalItemPrices.reduce((all, current) => { @@ -121,11 +121,11 @@ function PriceGraph({ item, itemId }) { height = 1280; } - if (status !== 'succeeded' || !data?.data?.historicalItemPrices) { + if (status !== 'success' || !data?.data?.historicalItemPrices) { return null; } - if (status === 'succeeded' && data.data.historicalItemPrices.length < 2) { + if (status === 'success' && data.data.historicalItemPrices.length < 2) { return t('No data'); } diff --git a/src/components/server-status/index.js b/src/components/server-status/index.js index fad6512ec..129d14229 100644 --- a/src/components/server-status/index.js +++ b/src/components/server-status/index.js @@ -10,7 +10,7 @@ import './index.css'; function ServerStatus() { const { status, data } = useQuery( `server-status`, - `{ + `query TarkovDevStatus { status { generalStatus { name @@ -24,15 +24,15 @@ function ServerStatus() { solveTime } } - }`, + }`.replace(/\s{2,}/g, ' '), ); const { t } = useTranslation(); - if (status !== 'succeeded' || !data.data.status) { + if (status !== 'success' || !data.data.status) { return null; } - if (status === 'succeeded' && data.data.status.length === 0) { + if (status === 'success' && data.data.status.length === 0) { return t('No data'); } diff --git a/src/features/crafts/do-fetch-crafts.mjs b/src/features/crafts/do-fetch-crafts.mjs index 5fc5afdaf..2cb833514 100644 --- a/src/features/crafts/do-fetch-crafts.mjs +++ b/src/features/crafts/do-fetch-crafts.mjs @@ -36,7 +36,7 @@ class CraftsQuery extends APIQuery { id } } - }`; + }`.replace(/\s{2,}/g, ' '); const craftsData = await this.graphqlRequest(query); diff --git a/src/features/items/do-fetch-items.mjs b/src/features/items/do-fetch-items.mjs index 6fcb6c0c6..7966c5051 100644 --- a/src/features/items/do-fetch-items.mjs +++ b/src/features/items/do-fetch-items.mjs @@ -393,7 +393,7 @@ class ItemsQuery extends APIQuery { sellOfferFeeRate sellRequirementFeeRate } - }`), + }`.replace(/\s{2,}/g, ' ')), new Promise(resolve => { if (prebuild) { return resolve({}); @@ -478,12 +478,12 @@ class ItemsQuery extends APIQuery { gridPockets = itemGrids[rawItem.id]; } else if (rawItem.properties.grids.length === 1) { - gridPockets = { + gridPockets = [{ row: 0, col: 0, width: rawItem.properties.grids[0].width, height: rawItem.properties.grids[0].height, - }; + }]; } if (gridPockets.length > 1) { diff --git a/src/pages/item/index.js b/src/pages/item/index.js index 587fff30b..f5fcbd928 100644 --- a/src/pages/item/index.js +++ b/src/pages/item/index.js @@ -437,9 +437,9 @@ The max profitable price is impacted by the intel center and hideout management
{currentItemData.grid && ( )}