Added a link wrapper to the icon if the href config option has been set

This commit is contained in:
gazoscalvertos 2023-11-27 12:13:25 +00:00 committed by GitHub
parent 4c45c6453f
commit aaf681937d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,13 @@ export default function Logo({ options }) {
<Raw>
{options.icon ? (
<div className="resolved mr-3">
<ResolvedIcon icon={options.icon} width={48} height={48} />
{options.href ? (
<a href={options.href} target="_blank" rel="noreferrer">
<ResolvedIcon icon={options.icon} width={48} height={48} />
</a>
) : (
<ResolvedIcon icon={options.icon} width={48} height={48} />
)}
</div>
) : (
// fallback to homepage logo