Skip to content

Commit

Permalink
Cancel button fix in Book Appointment screen (ohcnetwork#9757)
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamathar authored Jan 5, 2025
1 parent 1166493 commit fd0a744
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import {
} from "@/components/Schedule/Appointments/utils";
import { ScheduleAPIs } from "@/components/Schedule/api";

import useAppHistory from "@/hooks/useAppHistory";

import mutate from "@/Utils/request/mutate";
import query from "@/Utils/request/query";
import { dateQueryString, formatDisplayName, formatName } from "@/Utils/utils";
Expand All @@ -41,6 +43,7 @@ interface Props {

export default function AppointmentCreatePage(props: Props) {
const { t } = useTranslation();
const { goBack } = useAppHistory();

const [resourceId, setResourceId] = useState<string>();
const [selectedMonth, setSelectedMonth] = useState(new Date());
Expand Down Expand Up @@ -363,7 +366,9 @@ export default function AppointmentCreatePage(props: Props) {
</div>

<div className="flex justify-end gap-4">
<Button variant="outline">{t("cancel")}</Button>
<Button variant="outline" type="button" onClick={() => goBack()}>
{t("cancel")}
</Button>
<Button
variant="primary"
type="submit"
Expand Down

0 comments on commit fd0a744

Please sign in to comment.