Skip to content

Commit 1fb5ff7

Browse files
committed
Fix UI build failures
1 parent c8fdd4f commit 1fb5ff7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ui/ui-app/src/app/pages/artifact/ArtifactPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export const ArtifactPage: FunctionComponent<ArtifactPageProps> = () => {
328328
onEditMetaData={doEditMetaData}
329329
/>
330330
<CreateVersionModal
331-
artifactType={artifact?.type || ""}
331+
artifactType={artifact?.artifactType || ""}
332332
isOpen={isCreateVersionModalOpen}
333333
onClose={() => setIsCreateVersionModalOpen(false)}
334334
onCreate={doCreateArtifactVersion}

ui/ui-app/src/app/pages/version/VersionPage.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -104,31 +104,31 @@ export const VersionPage: FunctionComponent<ArtifactVersionPageProps> = () => {
104104
};
105105

106106
const showDocumentationTab = (): boolean => {
107-
return artifact?.type === "OPENAPI" && artifactVersion?.state !== "DISABLED";
107+
return artifact?.artifactType === "OPENAPI" && artifactVersion?.state !== "DISABLED";
108108
};
109109

110110
const doDownloadVersion = (): void => {
111111
const content: string = versionContent;
112112

113113
let contentType: string = ContentTypes.APPLICATION_JSON;
114114
let fext: string = "json";
115-
if (artifact?.type === ArtifactTypes.PROTOBUF) {
115+
if (artifact?.artifactType === ArtifactTypes.PROTOBUF) {
116116
contentType = ContentTypes.APPLICATION_PROTOBUF;
117117
fext = "proto";
118118
}
119-
if (artifact?.type === ArtifactTypes.WSDL) {
119+
if (artifact?.artifactType === ArtifactTypes.WSDL) {
120120
contentType = ContentTypes.APPLICATION_XML;
121121
fext = "wsdl";
122122
}
123-
if (artifact?.type === ArtifactTypes.XSD) {
123+
if (artifact?.artifactType === ArtifactTypes.XSD) {
124124
contentType = ContentTypes.APPLICATION_XML;
125125
fext = "xsd";
126126
}
127-
if (artifact?.type === ArtifactTypes.XML) {
127+
if (artifact?.artifactType === ArtifactTypes.XML) {
128128
contentType = ContentTypes.APPLICATION_XML;
129129
fext = "xml";
130130
}
131-
if (artifact?.type === ArtifactTypes.GRAPHQL) {
131+
if (artifact?.artifactType === ArtifactTypes.GRAPHQL) {
132132
contentType = ContentTypes.APPLICATION_JSON;
133133
fext = "graphql";
134134
}
@@ -212,10 +212,10 @@ export const VersionPage: FunctionComponent<ArtifactVersionPageProps> = () => {
212212
/>
213213
</Tab>,
214214
<Tab data-testid="documentation-tab" eventKey="documentation" title="Documentation" key="documentation" className="documentation-tab">
215-
<DocumentationTabContent versionContent={versionContent} artifactType={artifact?.type as string} />
215+
<DocumentationTabContent versionContent={versionContent} artifactType={artifact?.artifactType as string} />
216216
</Tab>,
217217
<Tab data-testid="content-tab" eventKey="content" title="Content" key="content">
218-
<ContentTabContent versionContent={versionContent} artifactType={artifact?.type as string} />
218+
<ContentTabContent versionContent={versionContent} artifactType={artifact?.artifactType as string} />
219219
</Tab>,
220220
<Tab data-testid="references-tab" eventKey="references" title="References" key="references">
221221
<ReferencesTabContent version={artifactVersion as VersionMetaData} />

0 commit comments

Comments
 (0)