Skip to content

Commit

Permalink
Fix linting error in SubscriptionUsageChart
Browse files Browse the repository at this point in the history
  • Loading branch information
mabashian committed Jan 15, 2024
1 parent 42701f3 commit d24e57c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import styled from 'styled-components';

import { t } from '@lingui/macro';
import {
Card,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -77,7 +76,7 @@ function SubscriptionUsageChart() {
break;
}
return date;
};
}, [periodSelection]);

const {
isLoading,
Expand All @@ -89,7 +88,7 @@ function SubscriptionUsageChart() {
calculateDateRange()
);
return data.data.results;
}, [periodSelection]),
}, [calculateDateRange]),
[]
);

Expand Down

0 comments on commit d24e57c

Please sign in to comment.