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",
"url": "https://git.fascinated.cc",
"icon": "fab fa-git-alt",
"color": "bg-green-700"
"color": {
"normal": "bg-green-700"
}
},
{
"title": "Twitch",

@ -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 (
<a