Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react theming): stop homepage flicker for env-var based logos #4730

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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