Add ability to use custom logo

This commit is contained in:
Snekussaurier 2022-12-11 17:31:59 +01:00
parent 146326f427
commit 645cf211dd

View File

@ -1,5 +1,12 @@
export default function Logo() { import Image from "next/future/image";
export default function Logo({ options }) {
return ( return (
<div className="w-12 h-12 flex flex-row items-center align-middle mr-3 self-center">
{options.source ?
<Image src={`${options.source}`} width={48} height={48} alt="logo" /> :
// if source parameter is not set, use fallback homepage logo
<div className="w-12 h-12 flex flex-row items-center align-middle mr-3 self-center"> <div className="w-12 h-12 flex flex-row items-center align-middle mr-3 self-center">
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -52,5 +59,7 @@ export default function Logo() {
</g> </g>
</svg> </svg>
</div> </div>
); }
</div>
)
} }