Files
calendar/packages/features/shell/useAppTheme.ts
T
Benny JooandGitHub f0d1c92e99 perf: create (use-page-wrapper) route group and replace WithLayout from /bookings/[status] page + 8 low-risk single pages (#18737)
* add a layoutfile to use-page-wrapper route group

* refactor and move bookings status page to route group

* improve logic in pagesAndRewritePaths

* fix

* add use client directive

* chore: remove WithLayout from 8 low-risk single pages (#18745)

* move /403 and /500

* move /auth/error

* move /connect-and-join

* move /enterprise

* move /maintenance

* move /more

* move /upgrade

* pass dehydratedState in layout
2025-01-22 12:52:58 -05:00

17 lines
480 B
TypeScript

"use client";
import getBrandColours from "@calcom/lib/getBrandColours";
import useTheme from "@calcom/lib/hooks/useTheme";
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
import { useCalcomTheme } from "@calcom/ui";
export const useAppTheme = () => {
const { data: user } = useMeQuery();
const brandTheme = getBrandColours({
lightVal: user?.brandColor,
darkVal: user?.darkBrandColor,
});
useCalcomTheme(brandTheme);
useTheme(user?.appTheme);
};