Fix linting error in SubscriptionUsageChart

This commit is contained in:
Michael Abashian
2024-01-15 14:41:07 -05:00
committed by Michael Abashian
parent 5f5cd960d5
commit 5a93a519f6

View File

@@ -1,6 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react'; import React, { useCallback, useEffect, useState } from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import { t } from '@lingui/macro'; import { t } from '@lingui/macro';
import { import {
Card, Card,
@@ -47,7 +46,7 @@ function SubscriptionUsageChart() {
const [periodSelection, setPeriodSelection] = useState('year'); const [periodSelection, setPeriodSelection] = useState('year');
const userProfile = useUserProfile(); const userProfile = useUserProfile();
const calculateDateRange = () => { const calculateDateRange = useCallback(() => {
const today = new Date(); const today = new Date();
let date = ''; let date = '';
switch (periodSelection) { switch (periodSelection) {
@@ -77,7 +76,7 @@ function SubscriptionUsageChart() {
break; break;
} }
return date; return date;
}; }, [periodSelection]);
const { const {
isLoading, isLoading,
@@ -89,7 +88,7 @@ function SubscriptionUsageChart() {
calculateDateRange() calculateDateRange()
); );
return data.data.results; return data.data.results;
}, [periodSelection]), }, [calculateDateRange]),
[] []
); );