add check if links exists
Some checks failed
Publish Docker Image / docker (push) Has been cancelled

This commit is contained in:
Lee 2023-07-12 09:41:04 +01:00
parent 9004e01a98
commit 1a0e99a758

@ -91,23 +91,24 @@ export default function Home() {
{/* Links (Buttons) */} {/* Links (Buttons) */}
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
{links.map((link, index) => { {links &&
const icons: any = link.icon?.split(" ") ?? []; links.map((link, index) => {
const icons: any = link.icon?.split(" ") ?? [];
return ( return (
<a <a
key={index} key={index}
href={link.url} href={link.url}
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className={`flex flex-row items-center justify-center mt-4 px-4 w-60 py-2 rounded className={`flex flex-row items-center justify-center mt-4 px-4 w-60 py-2 rounded
${selectedTheme.buttonTextColor} ${link.color.normal} hover:brightness-75 transition gap-2`} ${selectedTheme.buttonTextColor} ${link.color.normal} hover:brightness-75 transition gap-2`}
> >
{link.icon && <FontAwesomeIcon icon={icons} />} {link.icon && <FontAwesomeIcon icon={icons} />}
<p>{link.title}</p> <p>{link.title}</p>
</a> </a>
); );
})} })}
</div> </div>
{/* Social Links */} {/* Social Links */}