Skip to content

Commit

Permalink
feat: conditionally show logo based on config
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianKwan committed Oct 13, 2022
1 parent c99831c commit 6321ca3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions frontend/src/components/layout/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ReactComponent as OpenMenuIcon } from '../../../assets/icons/open-menu-
import { ReactComponent as CloseMenuIcon } from '../../../assets/icons/close-menu-icon.svg';
import { ReactComponent as ButtonIcon } from '../../../assets/icons/button-icon.svg';

const { orgLogoUrl, orgName } = loadConfig();
const { orgLogoUrl, orgName, disableLogo } = loadConfig();

type FormValues = {
hash: string;
Expand Down Expand Up @@ -240,11 +240,13 @@ export const Header: React.FC = () => {
className="no-underline hover:no-underline focus:no-underline flex flex-row items-center"
to="/">
<div className="flex flex-row items-center">
<img
className="h-40 xxs:h-50"
src={orgLogoUrl || logo}
alt={`${orgName} Logo`}
/>
{!disableLogo && (
<img
className="h-40 xxs:h-50"
src={orgLogoUrl || logo}
alt={`${orgName} Logo`}
/>
)}
<p className="text-white text-18 xs:text-20 sm:text-24 md:text-26 pl-10 lg:pl-12 font-bold w-20ch">
{orgName} BlockExplorer
</p>
Expand Down

0 comments on commit 6321ca3

Please sign in to comment.