* 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
17 lines
480 B
TypeScript
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);
|
|
};
|