From c405ebd4f9078fda4bd03cde7cee250cdf3eabdf Mon Sep 17 00:00:00 2001 From: ChaituVR Date: Mon, 27 Nov 2023 16:33:02 +0530 Subject: [PATCH] fix: Hide mainnet networks from networks list --- src/views/ExploreView.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/ExploreView.vue b/src/views/ExploreView.vue index 965e880518e..efa9ff8316a 100644 --- a/src/views/ExploreView.vue +++ b/src/views/ExploreView.vue @@ -50,11 +50,14 @@ const { filterPlugins, getPluginsSpacesCount, loadingPluginsSpacesCount } = const { filterStrategies, getStrategies, isLoadingStrategies } = useStrategies(); +const { env } = useApp(); + +const onlyMainnetNetworks = n => (env === 'production' ? !n.testnet : true); const items = computed(() => { const q = route.query.q || ''; if (isStrategies.value) return filterStrategies(q); - if (isNetworks.value) return filterNetworks(q); + if (isNetworks.value) return filterNetworks(q).filter(onlyMainnetNetworks); if (isPlugins.value) return filterPlugins(q); return []; }); @@ -138,6 +141,7 @@ useInfiniteScroll(