From 7ca98094ea6b0c668b8acfd7e1879462a8c10411 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 8 Jan 2021 10:08:20 -0800 Subject: [PATCH] Rerendeing issues + erroneous logs. --- .../schedule-day-view/schedule-day-view.container.jsx | 3 ++- .../schedule-job-modal/schedule-job-modal.container.jsx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/schedule-day-view/schedule-day-view.container.jsx b/client/src/components/schedule-day-view/schedule-day-view.container.jsx index 340adca80..c8f5236c4 100644 --- a/client/src/components/schedule-day-view/schedule-day-view.container.jsx +++ b/client/src/components/schedule-day-view/schedule-day-view.container.jsx @@ -6,12 +6,13 @@ import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; import moment from "moment"; import { useTranslation } from "react-i18next"; export default function ScheduleDayViewContainer({ day }) { + console.log("day", day); const { loading, error, data } = useQuery(QUERY_APPOINTMENT_BY_DATE, { variables: { start: moment(day).startOf("day"), end: moment(day).endOf("day"), }, - skip: !!!day, + skip: !moment(day).isValid(), fetchPolicy: "network-only", }); const { t } = useTranslation(); diff --git a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx index 6c0d10b06..75b41036d 100644 --- a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx +++ b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx @@ -10,7 +10,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils"; import { CANCEL_APPOINTMENT_BY_ID, INSERT_APPOINTMENT, - QUERY_APPOINTMENTS_BY_JOBID, + QUERY_APPOINTMENTS_BY_JOBID } from "../../graphql/appointments.queries"; import { QUERY_LBR_HRS_BY_PK, UPDATE_JOBS } from "../../graphql/jobs.queries"; import { setEmailOptions } from "../../redux/email/email.actions"; @@ -159,7 +159,6 @@ export function ScheduleJobModalContainer({ width={"90%"} maskClosable={false} destroyOnClose - forceRender okButtonProps={{ loading: loading, }}