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-04 15:40:46 +00:00
|
|
|
import { Badge } from "@calcom/ui/components/badge/Badge";
|
2022-10-10 17:00:09 +00:00
|
|
|
|
|
|
|
export default function UnconfirmedBookingBadge() {
|
|
|
|
const { t } = useLocale();
|
|
|
|
const { data: unconfirmedBookingCount } = trpc.useQuery(["viewer.bookingUnconfirmedCount"]);
|
|
|
|
if (!unconfirmedBookingCount) return null;
|
|
|
|
else
|
|
|
|
return (
|
|
|
|
<Link href="/bookings/unconfirmed">
|
|
|
|
<a title={t("unconfirmed_bookings_tooltip")}>
|
|
|
|
<Badge rounded variant="orange" className="hover:bg-orange-800 hover:text-orange-100">
|
|
|
|
{unconfirmedBookingCount}
|
|
|
|
</Badge>
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|