2022-10-10 17:00:09 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
|
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
|
|
import { trpc } from "@calcom/trpc/react";
|
2022-11-23 02:55:25 +00:00
|
|
|
import { Badge } from "@calcom/ui";
|
2022-10-10 17:00:09 +00:00
|
|
|
|
|
|
|
export default function UnconfirmedBookingBadge() {
|
|
|
|
const { t } = useLocale();
|
2022-11-10 23:40:01 +00:00
|
|
|
const { data: unconfirmedBookingCount } = trpc.viewer.bookingUnconfirmedCount.useQuery();
|
2022-10-10 17:00:09 +00:00
|
|
|
if (!unconfirmedBookingCount) return null;
|
2023-01-06 12:13:56 +00:00
|
|
|
return (
|
|
|
|
<Link href="/bookings/unconfirmed">
|
|
|
|
<Badge
|
|
|
|
rounded
|
|
|
|
title={t("unconfirmed_bookings_tooltip")}
|
|
|
|
variant="orange"
|
|
|
|
className="cursor-pointer hover:bg-orange-800 hover:text-orange-100">
|
|
|
|
{unconfirmedBookingCount}
|
|
|
|
</Badge>
|
|
|
|
</Link>
|
|
|
|
);
|
2022-10-10 17:00:09 +00:00
|
|
|
}
|