* banners * useAuthHooks * fixes to redirect and banner * extract useIntercom to custom hook * use app theme * extract user-dropdown to new component * Navigation Item * navigation and profile dropdown * Fix import * navigation and sidebar * fix type errors * fix banners being an async call * fix types * fix banner prop type * fix mobile nav item import * fix banner types * (revert) layout banner render method to fix type error --------- Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
15 lines
465 B
TypeScript
15 lines
465 B
TypeScript
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);
|
|
};
|