-
-
{t("disable_cal_branding")}
{" "}
-
{t("pro")}
+
+
(
+ <>
+
+
+
+
{t("disable_cal_branding")}
{" "}
+
{t("pro")}
+
+
{t("removes_cal_branding")}
+
+
+ formMethods.setValue("hideBranding", checked)}
+ checked={value}
+ />
-
{t("removes_cal_branding")}
-
- formMethods.setValue("hideBranding", checked)}
- checked={value}
- />
-
-
- >
- )}
- />
-
-
- );
+ >
+ )}
+ />
+
+
+ );
};
AppearanceView.getLayout = getLayout;
export default AppearanceView;
-
-export const getServerSideProps = async (context: GetServerSidePropsContext) => {
- const session = await getSession(context);
-
- if (!session?.user?.id) {
- return { redirect: { permanent: false, destination: "/auth/login" } };
- }
-
- const user = await prisma.user.findUnique({
- where: {
- id: session.user.id,
- },
- select: {
- username: true,
- timeZone: true,
- timeFormat: true,
- weekStart: true,
- brandColor: true,
- darkBrandColor: true,
- hideBranding: true,
- theme: true,
- eventTypes: {
- select: {
- title: true,
- },
- },
- },
- });
-
- if (!user) {
- throw new Error("User seems logged in but cannot be found in the db");
- }
-
- return {
- props: {
- user,
- },
- };
-};
-
interface ThemeLabelProps {
variant: "light" | "dark" | "system";
value?: "light" | "dark" | null;
diff --git a/apps/web/pages/v2/settings/my-account/calendars.tsx b/apps/web/pages/v2/settings/my-account/calendars.tsx
index 3ee3739ba2..b4bf5a2863 100644
--- a/apps/web/pages/v2/settings/my-account/calendars.tsx
+++ b/apps/web/pages/v2/settings/my-account/calendars.tsx
@@ -11,6 +11,7 @@ import Badge from "@calcom/ui/v2/core/Badge";
import EmptyScreen from "@calcom/ui/v2/core/EmptyScreen";
import Meta from "@calcom/ui/v2/core/Meta";
import { getLayout } from "@calcom/ui/v2/core/layouts/SettingsLayout";
+import { SkeletonContainer, SkeletonText, SkeletonButton } from "@calcom/ui/v2/core/skeleton";
import { List, ListItem, ListItemText, ListItemTitle } from "@calcom/ui/v2/modules/List";
import DestinationCalendarSelector from "@calcom/ui/v2/modules/event-types/DestinationCalendarSelector";
import DisconnectIntegration from "@calcom/ui/v2/modules/integrations/DisconnectIntegration";
@@ -19,6 +20,21 @@ import { QueryCell } from "@lib/QueryCell";
import { CalendarSwitch } from "@components/v2/settings/CalendarSwitch";
+const SkeletonLoader = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
const CalendarsView = () => {
const { t } = useLocale();
const router = useRouter();
@@ -37,6 +53,7 @@ const CalendarsView = () => {
}
success={({ data }) => {
return data.connectedCalendars.length ? (
@@ -65,7 +82,6 @@ const CalendarsView = () => {
/>
@@ -130,9 +146,9 @@ const CalendarsView = () => {
) : (