mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 09:18:48 -03:30
Fix linting error in SubscriptionUsageChart
This commit is contained in:
committed by
Michael Abashian
parent
5f5cd960d5
commit
5a93a519f6
@@ -1,6 +1,5 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { t } from '@lingui/macro';
|
||||
import {
|
||||
Card,
|
||||
@@ -47,7 +46,7 @@ function SubscriptionUsageChart() {
|
||||
const [periodSelection, setPeriodSelection] = useState('year');
|
||||
const userProfile = useUserProfile();
|
||||
|
||||
const calculateDateRange = () => {
|
||||
const calculateDateRange = useCallback(() => {
|
||||
const today = new Date();
|
||||
let date = '';
|
||||
switch (periodSelection) {
|
||||
@@ -77,7 +76,7 @@ function SubscriptionUsageChart() {
|
||||
break;
|
||||
}
|
||||
return date;
|
||||
};
|
||||
}, [periodSelection]);
|
||||
|
||||
const {
|
||||
isLoading,
|
||||
@@ -89,7 +88,7 @@ function SubscriptionUsageChart() {
|
||||
calculateDateRange()
|
||||
);
|
||||
return data.data.results;
|
||||
}, [periodSelection]),
|
||||
}, [calculateDateRange]),
|
||||
[]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user