mirror of
https://github.com/luxfi/explore.git
synced 2026-07-27 05:54:15 +00:00
17 lines
406 B
TypeScript
17 lines
406 B
TypeScript
import type { ChainConfig } from 'types/multichain';
|
|
|
|
export default function getIconUrl(config: ChainConfig) {
|
|
if (!config.config?.UI?.navigation?.icon || !config.config.app) {
|
|
return;
|
|
}
|
|
|
|
const iconPath = config.config.UI.navigation.icon.default;
|
|
|
|
if (iconPath?.startsWith('http')) {
|
|
return iconPath;
|
|
}
|
|
|
|
const appUrl = config.config.app.baseUrl;
|
|
return `${ appUrl }${ iconPath }`;
|
|
}
|