From cf9f7aa951e26a05ecf014f96d55a43640e9708c Mon Sep 17 00:00:00 2001 From: Yehor Podporinov Date: Tue, 30 Jan 2024 13:47:02 +0200 Subject: [PATCH] link of community tab for mainnet config --- src/pages/HomePage/index.vue | 7 ++++++- src/router/index.ts | 16 +++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/pages/HomePage/index.vue b/src/pages/HomePage/index.vue index ef7fee9..6c3ddb8 100644 --- a/src/pages/HomePage/index.vue +++ b/src/pages/HomePage/index.vue @@ -14,6 +14,7 @@ import { AppTabs } from '@/common' import { useContext } from '@/composables' import { ROUTE_NAMES } from '@/enums' import { type Tab } from '@/types' +import { config } from '@config' const { $t } = useContext() @@ -26,7 +27,11 @@ const tabs: Tab[] = [ { title: $t('home-page.community-tab'), id: 'community', - route: { name: ROUTE_NAMES.appCommunity }, + ...(!config.IS_MAINNET + ? { route: { name: ROUTE_NAMES.appCommunity } } + : { + href: 'https://github.com/MorpheusAIs/Morpheus/blob/main/Contributions/Community%20-%20Proof%20of%20Contribution.md', + }), }, { title: $t('home-page.coders-tab'), diff --git a/src/router/index.ts b/src/router/index.ts index b82aa20..d4cf5a7 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,6 +7,7 @@ import { } from 'vue-router' import { ROUTE_NAMES } from '@/enums' +import { config } from '@/config' const routes: Array = [ { @@ -24,11 +25,16 @@ const routes: Array = [ name: ROUTE_NAMES.appCapital, component: () => import('@/pages/HomePage/views/CapitalView.vue'), }, - { - path: 'community', - name: ROUTE_NAMES.appCommunity, - component: () => import('@/pages/HomePage/views/CommunityView.vue'), - }, + ...(!config.IS_MAINNET + ? [ + { + path: 'community', + name: ROUTE_NAMES.appCommunity, + component: () => + import('@/pages/HomePage/views/CommunityView.vue'), + }, + ] + : []), ], }, {