Skip to content

Commit

Permalink
confirming event gives no visual feedback (calcom#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT authored Sep 28, 2021
1 parent 58dde56 commit dcea723
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pages/bookings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { BanIcon, CalendarIcon, CheckIcon, ClockIcon, XIcon } from "@heroicons/r
import { DotsHorizontalIcon } from "@heroicons/react/solid";
import { BookingStatus } from "@prisma/client";
import dayjs from "dayjs";
import { useRouter } from "next/router";
import { Fragment } from "react";

import classNames from "@lib/classNames";
Expand All @@ -20,8 +19,6 @@ export default function Bookings() {
const query = trpc.useQuery(["viewer.bookings"]);
const bookings = query.data;

const router = useRouter();

async function confirmBookingHandler(booking: { id: number }, confirm: boolean) {
const res = await fetch("/api/book/confirm", {
method: "PATCH",
Expand All @@ -31,7 +28,7 @@ export default function Bookings() {
},
});
if (res.ok) {
await router.replace(router.asPath);
await query.refetch();
}
}

Expand Down

0 comments on commit dcea723

Please sign in to comment.