diff --git a/config.json b/config.json index 75a682c..2f7b49f 100644 --- a/config.json +++ b/config.json @@ -35,7 +35,9 @@ "title": "Git", "url": "https://git.fascinated.cc", "icon": "fab fa-git-alt", - "color": "bg-green-700" + "color": { + "normal": "bg-green-700" + } }, { "title": "Twitch", diff --git a/src/app/page.tsx b/src/app/page.tsx index aad1586..bce9da1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -96,8 +96,13 @@ export default function Home() { {links && links.map((link, index) => { const icons: any = link.icon?.split(" ") ?? []; - const legacyColor: any = link.color; // Here so old configs don't break - const color = link.color || legacyColor.normal; + let color: any = link.color; + // Here so old configs don't break + if (color.normal != undefined) { + color = color.normal; + } else { + color = link.color; + } return (