Skip to content

Commit

Permalink
Merge pull request #163 from line/dev
Browse files Browse the repository at this point in the history
release: 4.2405.36
  • Loading branch information
h4l-yup authored Feb 1, 2024
2 parents b2aaf7c + 221174d commit 6cb0276
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 2 additions & 5 deletions apps/web/src/containers/dashboard/TodayFeedbackCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import { useTranslation } from 'react-i18next';
import { DashboardCard } from '@/components';
import { useOAIQuery } from '@/hooks';

const endDate = dayjs().toISOString();
const yesterdayEndDate = dayjs().subtract(1, 'day').toISOString();

interface IProps {
projectId: number;
}
Expand All @@ -34,7 +31,7 @@ const TodayFeedbackCard: React.FC<IProps> = ({ projectId }) => {
path: '/api/admin/statistics/feedback/count',
variables: {
from: dayjs().startOf('day').toISOString(),
to: endDate,
to: dayjs().endOf('day').toISOString(),
projectId,
},
queryOptions: {
Expand All @@ -49,7 +46,7 @@ const TodayFeedbackCard: React.FC<IProps> = ({ projectId }) => {
path: '/api/admin/statistics/feedback/count',
variables: {
from: dayjs().subtract(1, 'day').startOf('day').toISOString(),
to: yesterdayEndDate,
to: dayjs().subtract(1, 'day').endOf('day').toISOString(),
projectId,
},
queryOptions: {
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/containers/dashboard/TotalFeedbackCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const TotalFeedbackCard: React.FC<IProps> = ({ projectId, from, to }) => {

const { data } = useOAIQuery({
path: '/api/admin/statistics/feedback/count',
variables: { from: from.toISOString(), to: to.toISOString(), projectId },
variables: {
from: dayjs(from).startOf('day').toISOString(),
to: dayjs(to).endOf('day').toISOString(),
projectId,
},
queryOptions: {
refetchOnMount: false,
refetchOnWindowFocus: false,
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/containers/dashboard/TotalIssueCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const TotalIssueCard: React.FC<IProps> = ({ from, to, projectId }) => {

const { data } = useOAIQuery({
path: '/api/admin/statistics/issue/count',
variables: { from: from.toISOString(), to: to.toISOString(), projectId },
variables: {
from: dayjs(from).startOf('day').toISOString(),
to: dayjs(to).endOf('day').toISOString(),
projectId,
},
queryOptions: {
refetchOnMount: false,
refetchOnWindowFocus: false,
Expand Down

0 comments on commit 6cb0276

Please sign in to comment.