Skip to content

Commit

Permalink
Use current date as start date
Browse files Browse the repository at this point in the history
We no longer want to control the pause start date from CMS, but always fallback to the current date
  • Loading branch information
JacobArrow committed Nov 16, 2023
1 parent 8c8092a commit 1c11063
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { FC, useCallback, useState, useEffect, FormEvent } from "react";
import dayjs from "dayjs";
import { useQueryClient } from "react-query";
import Link from "../../../../components/atoms/links/Link";
import Modal, { useModalButtonHandler } from "../../../../core/utils/modal";
Expand All @@ -9,7 +10,6 @@ import {
} from "../../../../core/fbs/fbs";
import { Patron, PatronV5 } from "../../../../core/fbs/model";
import { getModalIds } from "../../../../core/utils/helpers/general";
import { useConfig } from "../../../../core/utils/config";
import DateInputs from "../../../../components/date-inputs/date-inputs";
import { useUrls } from "../../../../core/utils/url";

Expand All @@ -25,10 +25,8 @@ const PauseReservation: FC<PauseReservationProps> = ({ id, user }) => {
const { mutate } = useUpdateV5();
const { close } = useModalButtonHandler();
const { pauseReservation } = getModalIds();
const config = useConfig();
const [startDate, setStartDate] = useState<string>(
config("pauseReservationStartDateConfig")
);
const currentDate = dayjs().format("YYYY-MM-DD");
const [startDate, setStartDate] = useState<string>(currentDate);
const [endDate, setEndDate] = useState<string>("");

const save = useCallback(
Expand Down

0 comments on commit 1c11063

Please sign in to comment.