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",
|
"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
|
||||||
|
Loading…
Reference in New Issue
Block a user