generated from Fascinated/nextjs-13-template-with-tailwindcss
fix legacy color
All checks were successful
Publish Docker Image / docker (push) Successful in 1m42s
All checks were successful
Publish Docker Image / docker (push) Successful in 1m42s
This commit is contained in:
parent
aa466b3277
commit
fb73bb6fe7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user