2
0
Files
cal/calcom/packages/features/users/components/CalendarCredentialBanner.tsx
2024-08-09 00:39:27 +02:00

32 lines
801 B
TypeScript

import Link from "next/link";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { type RouterOutputs } from "@calcom/trpc";
import { TopBanner } from "@calcom/ui";
export type CalendarCredentialBannerProps = {
data: RouterOutputs["viewer"]["getUserTopBanners"]["calendarCredentialBanner"];
};
function CalendarCredentialBanner({ data }: CalendarCredentialBannerProps) {
const { t } = useLocale();
if (!data) return null;
return (
<>
<TopBanner
text={`${t("something_went_wrong")} ${t("calendar_error")}`}
variant="error"
actions={
<Link href="/apps/installed/calendar" className="border-b border-b-black">
{t("check_here")}
</Link>
}
/>
</>
);
}
export default CalendarCredentialBanner;