Fixes: https://github.com/calcom/cal.com/issues/12473 TODO: - [x] Fix Type error <img width="1512" alt="Screenshot 2023-12-02 at 12 47 19 AM" src="https://github.com/calcom/cal.com/assets/53316345/8a5c6dd0-6095-482b-b4d0-81653607a270"> <img width="1512" alt="Screenshot 2023-12-02 at 12 47 39 AM" src="https://github.com/calcom/cal.com/assets/53316345/fc64edb9-27b3-438f-b42d-75b200ac96e9">
32 lines
801 B
TypeScript
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;
|