Skip to content

Commit

Permalink
fix: bug when initial the card
Browse files Browse the repository at this point in the history
  • Loading branch information
dadiorchen committed Dec 18, 2021
1 parent cf48b04 commit 2866afd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ function Home(props) {
{ range: 365 * 100, text: 'All' },
];
const [timeRangeIndex, setTimeRangeIndex] = React.useState(3);
const [startDate, setStartDate] = React.useState(
moment()
.add(-1 * timeRange[timeRangeIndex], 'day')
.format('YYYY-MM-DD'),
);
const [startDate, setStartDate] = React.useState('1970-01-01');
const [endDate /*, setEndDate*/] = React.useState(
moment().format('YYYY-MM-DD'),
);
Expand Down

0 comments on commit 2866afd

Please sign in to comment.