Skip to content

Commit

Permalink
stop homepage flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe-lyons committed Apr 22, 2022
1 parent c5b8f57 commit 5a43bfa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion datahub-web-react/src/app/home/HomePageHeader.tsx
Expand Up @@ -17,6 +17,7 @@ import analytics, { EventType } from '../analytics';
import { AdminHeaderLinks } from '../shared/admin/AdminHeaderLinks';
import { ANTD_GRAY } from '../entity/shared/constants';
import { useAppConfig } from '../useAppConfig';
import { DEFAULT_APP_CONFIG } from '../../appConfigContext';

const Background = styled.div`
width: 100%;
Expand Down Expand Up @@ -196,7 +197,11 @@ export const HomePageHeader = () => {
</Row>
<HeaderContainer>
<Image
src={appConfig.config.visualConfig.logoUrl || themeConfig.assets.logoUrl}
src={
appConfig.config !== DEFAULT_APP_CONFIG
? appConfig.config.visualConfig.logoUrl || themeConfig.assets.logoUrl
: undefined
}
preview={false}
style={styles.logoImage}
/>
Expand Down
7 changes: 6 additions & 1 deletion datahub-web-react/src/app/search/SearchHeader.tsx
Expand Up @@ -10,6 +10,7 @@ import EntityRegistry from '../entity/EntityRegistry';
import { ANTD_GRAY } from '../entity/shared/constants';
import { AdminHeaderLinks } from '../shared/admin/AdminHeaderLinks';
import { useAppConfig } from '../useAppConfig';
import { DEFAULT_APP_CONFIG } from '../../appConfigContext';

const { Header } = Layout;

Expand Down Expand Up @@ -82,7 +83,11 @@ export const SearchHeader = ({
<LogoSearchContainer>
<Link to="/">
<LogoImage
src={appConfig.config.visualConfig.logoUrl || themeConfig.assets.logoUrl}
src={
appConfig.config !== DEFAULT_APP_CONFIG
? appConfig.config.visualConfig.logoUrl || themeConfig.assets.logoUrl
: undefined
}
preview={false}
/>
</Link>
Expand Down

0 comments on commit 5a43bfa

Please sign in to comment.