fix: system default theme for dashboard and booking page (#15291)

* fix: system default theme

* update

---------

Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: unknown <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-07-19 13:42:21 +02:00
1 parent 5b97d3bf52
commit 159fe3a87d
4 files changed
+5 -4

No files matched your search

@@ -80,7 +80,7 @@ const OrgAppearanceView = ({
form={themeForm}
handleSubmit={(value) => {
mutation.mutate({
theme: value.theme ?? null,
theme: value.theme === "" ? null : value.theme,
});
}}>
<div className="border-subtle mt-6 flex items-center rounded-t-xl border p-6 text-sm">
@@ -92,7 +92,7 @@ const ProfileView = ({ team }: ProfileViewProps) => {
handleSubmit={(values) => {
mutation.mutate({
id: team.id,
theme: values.theme || null,
theme: values.theme === "" ? null : values.theme,
});
}}>
<div className="border-subtle mt-6 flex items-center rounded-t-xl border p-6 text-sm">
+1
View File
@@ -11,6 +11,7 @@ import { useEmbedTheme } from "@calcom/embed-core/embed-iframe";
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export default function useTheme(themeToSet: "system" | (string & {}) | undefined | null, getOnly = false) {
themeToSet = themeToSet ? themeToSet : "system";
const { resolvedTheme, setTheme, forcedTheme, theme: activeTheme } = useNextTheme();
const embedTheme = useEmbedTheme();