Skip to content

Commit 7610d52

Browse files
committed
resolveRuntimePath to resolve configured logo and ref from ErrorSection Image src
1 parent 08bdf57 commit 7610d52

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

datahub-web-react/src/app/shared/error/ErrorSection.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ import React from 'react';
33
import styled, { useTheme } from 'styled-components';
44

55
import { ANTD_GRAY } from '@app/entity/shared/constants';
6-
7-
/*
8-
TO-DO:
9-
Import image from path at theme config object assets.logoUrl
10-
Update TitleSection Image src value accordingly
11-
*/
12-
import dataHubLogo from '@images/datahublogo.png';
6+
import { resolveRuntimePath } from '@utils/runtimeBasePath';
137

148
const Section = styled.div`
159
width: auto;
@@ -66,12 +60,13 @@ const resources = [
6660

6761
export const ErrorSection = (): JSX.Element => {
6862
const themeConfig = useTheme();
63+
const themeLogo = resolveRuntimePath(themeConfig.assets.logoUrl || '@images/datahublogo.png');
6964

7065
return (
7166
<Section>
7267
<div>
7368
<TitleSection>
74-
<Image src={dataHubLogo} preview={false} style={{ width: 40 }} />
69+
<Image src={themeLogo} preview={false} style={{ width: 40 }} />
7570
<TitleText strong>{themeConfig.content.title}</TitleText>
7671
</TitleSection>
7772
<MessageSection>

0 commit comments

Comments
 (0)