fix: calendar settings atom modifications (#17579)
* update selected calendars display when no calendar connected * remove no calendar connected message
This commit is contained in:
1 parent
ecac331fd1
commit
e206ead611
2 files changed
+7
-10
No files matched your search
+6
-1
@@ -54,7 +54,12 @@ export const SelectedCalendarsSettingsPlatformWrapper = ({
|
|||||||
const destinationCalendarId = data.destinationCalendar.externalId;
|
const destinationCalendarId = data.destinationCalendar.externalId;
|
||||||
|
|
||||||
if (!data.connectedCalendars.length) {
|
if (!data.connectedCalendars.length) {
|
||||||
return null;
|
return (
|
||||||
|
<SelectedCalendarsSettings classNames={classNames}>
|
||||||
|
<SelectedCalendarsSettingsHeading calendarRedirectUrls={calendarRedirectUrls} />
|
||||||
|
<h1 className="px-6 py-4 text-base leading-5">No connected calendars found.</h1>
|
||||||
|
</SelectedCalendarsSettings>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,22 +1,14 @@
|
|||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
import { Inter } from "next/font/google";
|
import { Inter } from "next/font/google";
|
||||||
|
|
||||||
import { useConnectedCalendars, CalendarSettings } from "@calcom/atoms";
|
import { CalendarSettings } from "@calcom/atoms";
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
|
||||||
export default function Calendars(props: { calUsername: string; calEmail: string }) {
|
export default function Calendars(props: { calUsername: string; calEmail: string }) {
|
||||||
const { isLoading, data: calendars } = useConnectedCalendars({});
|
|
||||||
const connectedCalendars = calendars?.connectedCalendars ?? [];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={`flex min-h-screen flex-col ${inter.className}`}>
|
<main className={`flex min-h-screen flex-col ${inter.className}`}>
|
||||||
<Navbar username={props.calUsername} />
|
<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>
|
<div>
|
||||||
<CalendarSettings />
|
<CalendarSettings />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user