Skip to content

Commit

Permalink
Rollback succeeded -> success for components that do useQuery directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Shebuka committed Jul 23, 2024
1 parent cf6e8f1 commit 5e8aa3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/api-metrics-graph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')}`;
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/price-graph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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');
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/server-status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function ServerStatus() {
);
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');
}

Expand Down

0 comments on commit 5e8aa3c

Please sign in to comment.