From 199b3430307889b7a0631554c3059b8a9443566c Mon Sep 17 00:00:00 2001 From: Zoltan Szabo Date: Wed, 31 Jul 2024 16:16:26 +0300 Subject: [PATCH] added missing file --- web/src/components/EEA_Logo.tsx | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 web/src/components/EEA_Logo.tsx diff --git a/web/src/components/EEA_Logo.tsx b/web/src/components/EEA_Logo.tsx new file mode 100644 index 00000000000..2dabd520cff --- /dev/null +++ b/web/src/components/EEA_Logo.tsx @@ -0,0 +1,84 @@ +"use client"; + +import { useContext } from "react"; +import { SettingsContext } from "./settings/SettingsProvider"; +import Image from "next/image"; + +export function Logo({ + height, + width, + className, +}: { + height?: number; + width?: number; + className?: string; +}) { + const settings = useContext(SettingsContext); + + height = height || 32; + width = width || 70; + + if ( + !settings || + !settings.enterpriseSettings || + !settings.enterpriseSettings.use_custom_logo + ) { + return ( +
+ Logo +
+ ); + } + + return ( +
+ {/* TODO: figure out how to use Next Image here */} + Logo +
+ ); +} +export function Logo_empty({ + height, + width, + className, +}: { + height?: number; + width?: number; + className?: string; +}) { + const settings = useContext(SettingsContext); + + height = height || 32; + width = width || 32; + if ( + !settings || + !settings.enterpriseSettings || + !settings.enterpriseSettings.use_custom_logo + ) { + return ( +
+
+ ); + } + + return ( +
+ {/* TODO: figure out how to use Next Image here */} + Logo +
+ ); +}