Skip to content

Commit

Permalink
Fix tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Dec 10, 2024
1 parent fa408c3 commit acc2f2c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/ui-next/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ export function useThemeEffect({

document.documentElement.style.setProperty(
"--theme-icon-url",
theme.icon.startsWith('http') ? `url("${theme.icon}")` : `url("${assetUrl}${theme.icon}")`,
theme.icon.startsWith("http")
? `url("${theme.icon}")`
: `url("${assetUrl}${theme.icon}")`,
);
const coverValue = typeof theme.cover === "string" ? theme.cover : theme.cover[appliedColorMode];
const coverUrl = coverValue.startsWith('http') ? `url("${coverValue}")` : `url("${assetUrl}${coverValue}")`;
const coverValue =
typeof theme.cover === "string"
? theme.cover
: theme.cover[appliedColorMode];
const coverUrl = coverValue.startsWith("http")
? `url("${coverValue}")`
: `url("${assetUrl}${coverValue}")`;
document.documentElement.style.setProperty("--theme-cover-url", coverUrl);

if (!theme.colors) return;
Expand Down

0 comments on commit acc2f2c

Please sign in to comment.