fix: update theme post sign-in (#4586)
This commit is contained in:
parent
55148ab3f7
commit
99e3097122
2 changed files with 30 additions and 10 deletions
|
|
@ -59,9 +59,8 @@ const calculateShades = (hexValue: string): TShades => {
|
|||
return shades as TShades;
|
||||
};
|
||||
|
||||
export const applyTheme = (palette: string, isDarkPalette: boolean) => {
|
||||
export const applyTheme = (palette: string, isDarkPalette: boolean, dom: HTMLElement | null) => {
|
||||
if (!palette) return;
|
||||
const dom = document?.querySelector<HTMLElement>("[data-theme='custom']");
|
||||
// palette: [bg, text, primary, sidebarBg, sidebarText]
|
||||
const values: string[] = palette.split(",");
|
||||
values.push(isDarkPalette ? "dark" : "light");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue