From 95dcb8802a9aea9fe073169a81648fc69d78f02d Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 11 Dec 2022 10:30:04 -0800 Subject: [PATCH] Use ResolvedIcon, remove extra div --- src/components/resolvedicon.jsx | 12 ++-- src/components/widgets/logo/logo.jsx | 99 ++++++++++++++-------------- 2 files changed, 54 insertions(+), 57 deletions(-) diff --git a/src/components/resolvedicon.jsx b/src/components/resolvedicon.jsx index 2a3701e83..3dad2b0e2 100644 --- a/src/components/resolvedicon.jsx +++ b/src/components/resolvedicon.jsx @@ -1,9 +1,9 @@ import Image from "next/future/image"; -export default function ResolvedIcon({ icon }) { +export default function ResolvedIcon({ icon, width = 32, height = 32 }) { // direct or relative URLs if (icon.startsWith("http") || icon.startsWith("/")) { - return logo; + return logo; } // mdi- prefixed, material design icons @@ -12,8 +12,8 @@ export default function ResolvedIcon({ icon }) { return (
); diff --git a/src/components/widgets/logo/logo.jsx b/src/components/widgets/logo/logo.jsx index 29ec3e2ea..96e8569fc 100644 --- a/src/components/widgets/logo/logo.jsx +++ b/src/components/widgets/logo/logo.jsx @@ -1,64 +1,61 @@ -import Image from "next/future/image"; +import ResolvedIcon from "components/resolvedicon" export default function Logo({ options }) { return (
- {options.source ? - logo : - - // if source parameter is not set, use fallback homepage logo -
- - - - : + // fallback to homepage logo + + + + + + - - - - - - - -
+ + + + }
)