fix legacy color
All checks were successful
Publish Docker Image / docker (push) Successful in 1m42s

This commit is contained in:
Lee 2023-07-12 11:18:31 +01:00
parent aa466b3277
commit fb73bb6fe7
2 changed files with 10 additions and 3 deletions

@ -35,7 +35,9 @@
"title": "Git", "title": "Git",
"url": "https://git.fascinated.cc", "url": "https://git.fascinated.cc",
"icon": "fab fa-git-alt", "icon": "fab fa-git-alt",
"color": "bg-green-700" "color": {
"normal": "bg-green-700"
}
}, },
{ {
"title": "Twitch", "title": "Twitch",

@ -96,8 +96,13 @@ export default function Home() {
{links && {links &&
links.map((link, index) => { links.map((link, index) => {
const icons: any = link.icon?.split(" ") ?? []; const icons: any = link.icon?.split(" ") ?? [];
const legacyColor: any = link.color; // Here so old configs don't break let color: any = link.color;
const color = link.color || legacyColor.normal; // Here so old configs don't break
if (color.normal != undefined) {
color = color.normal;
} else {
color = link.color;
}
return ( return (
<a <a