Skip to content

Commit 114e363

Browse files
committed
Support both locally shipped logos and remote img url
1 parent 966f583 commit 114e363

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

console/src/api.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ export async function fetchAllPatterns(): Promise<{
6464
return {
6565
patterns,
6666
catalogDescription: catalog.catalog_description,
67-
catalogLogo: catalog.catalog_logo,
67+
catalogLogo: catalog.catalog_logo
68+
? /^https?:\/\//.test(catalog.catalog_logo)
69+
? catalog.catalog_logo
70+
: `${PATTERN_UI_CATALOG_BASE_URL}/${catalog.catalog_logo}`
71+
: undefined,
6872
};
6973
}
7074

0 commit comments

Comments
 (0)