mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
23 lines
649 B
TypeScript
23 lines
649 B
TypeScript
import type { EssentialDappsChainConfig } from 'types/client/marketplace';
|
|
|
|
import config from 'configs/app';
|
|
import { isBrowser } from 'toolkit/utils/isBrowser';
|
|
|
|
import * as essentialDappsChainsConfigNodejs from './config.nodejs';
|
|
|
|
const marketplaceFeature = config.features.marketplace;
|
|
|
|
const essentialDappsChains: () => { chains: Array<EssentialDappsChainConfig> } | undefined = () => {
|
|
if (!marketplaceFeature.isEnabled || !marketplaceFeature.essentialDapps) {
|
|
return;
|
|
}
|
|
|
|
if (isBrowser()) {
|
|
return window.__essentialDappsChains;
|
|
}
|
|
|
|
return essentialDappsChainsConfigNodejs.getValue();
|
|
};
|
|
|
|
export default essentialDappsChains;
|