Skip to content

Commit

Permalink
fix: correct badge colors
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed Jul 24, 2024
1 parent 26acb64 commit 1e34066
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderer/coremods/badges/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,15 @@ export async function start(): Promise<void> {
badgeElements.forEach((badgeElement) => {
if (badgeCache[badgeElement.id]) {
const { component, ...props } = badgeElement;
const badgeColor = badgeCache.custom.color;

newBadges.push({
...props,
icon: "replugged",
component: React.createElement(component, {
color: badgeCache.custom.color ?? DISCORD_BLURPLE,
color:
(badgeColor && (badgeColor.startsWith("#") ? badgeColor : `#${badgeColor}`)) ??
DISCORD_BLURPLE,
}),
});
}
Expand Down

0 comments on commit 1e34066

Please sign in to comment.