fix: calendar settings atom modifications (#17579)

* update selected calendars display when no calendar connected

* remove no calendar connected message
This commit is contained in:
Rajiv Sahal
2024-11-18 11:05:34 -03:00
committed by GitHub
parent ecac331fd1
commit e206ead611
2 changed files with 7 additions and 10 deletions
@@ -1,22 +1,14 @@
import { Navbar } from "@/components/Navbar";
import { Inter } from "next/font/google";
import { useConnectedCalendars, CalendarSettings } from "@calcom/atoms";
import { CalendarSettings } from "@calcom/atoms";
const inter = Inter({ subsets: ["latin"] });
export default function Calendars(props: { calUsername: string; calEmail: string }) {
const { isLoading, data: calendars } = useConnectedCalendars({});
const connectedCalendars = calendars?.connectedCalendars ?? [];
return (
<main className={`flex min-h-screen flex-col ${inter.className}`}>
<Navbar username={props.calUsername} />
{!isLoading && !connectedCalendars?.length && (
<h1 className="mx-10 my-4 text-xl font-bold">
You have not connected any calendars yet, please connect your Google, Outlook or Apple calendar.
</h1>
)}
<div>
<CalendarSettings />
</div>