Skip to content

Commit

Permalink
fix: Hide mainnet networks from networks list
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Nov 27, 2023
1 parent 1d99d6a commit c405ebd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/views/ExploreView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
});
Expand Down Expand Up @@ -138,6 +141,7 @@ useInfiniteScroll(
</template>
<template v-else-if="isNetworks">
<div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
{{ items.map(item => item.key) }}
<div v-for="item in items.slice(0, limit)" :key="item.key">
<BaseNetworkItem :network="item" />
</div>
Expand Down

0 comments on commit c405ebd

Please sign in to comment.