added badge for unconfirmed bookings (#4912)
* added badge for unconfirmed bookings * added link to unconfirmed bookings * added rounded prop to badge, added unconfirmed badge to botto nav * Supporting recurring events + bug fix * Tooltip and hover style Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
6 files changed
+65
-3
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import Badge from "@calcom/ui/v2/core/Badge";
|
||||
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user