/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import React, { useState } from "react"; import { useSettings, useLogo, useFileLoaded } from "../hooks"; import defaultLogo from "../logo.svg"; import { useTranslation } from "react-i18next"; function Logo() { const { t } = useTranslation(); const { settings, loadingSettings } = useSettings(); const { logo, loadingFile } = useLogo(settings.customLogoS3Key); const [toHide, setToHide] = useState(true); let showLogo = false; if (settings.customLogoS3Key === undefined) { showLogo = true; } useFileLoaded(setToHide, loadingFile, loadingSettings, settings, "logo"); return ( <> {loadingFile || loadingSettings ? (
) : ( <> )} ); } export default Logo;