Skip to content

Commit

Permalink
fix: getJustDate arg in feeling hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushar-4781 committed Jun 23, 2024
1 parent bfb1ce5 commit f0247bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useFeelingsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const useFeelingsData = (trigger: boolean) => {
const allFeelings: IFeelingItem[] = await getAllFeelings();
const feelingsByDates = allFeelings.reduce<feelingListType>((dates, feeling) => {
const newDates = { ...dates };
const formattedDate = getJustDate(feeling.date).toString();
const formattedDate = getJustDate(new Date(feeling.date)).toString();
if (newDates[formattedDate]) {
newDates[formattedDate].push(feeling);
} else {
Expand Down

0 comments on commit f0247bf

Please sign in to comment.