Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Destore for Promotion #1198

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/images/dapp_promotions/destore.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/data/dapp_promotions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"name": "DeStore",
"shortDescription": "Web3 Shopify Powered by Astar",
"link": "https://twitter.com/DeStore_Network",
"img": "images/dapp_promotions/destore.jpg"
},
{
"name": "Lucky - No-loss lottery",
"shortDescription": "The more you stake, the more chance you have to win a raffle!",
Expand Down
20 changes: 1 addition & 19 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
createWebHistory,
} from 'vue-router';
import { StateInterface } from 'src/store';
import routes, { Path } from 'src/router/routes';
import { $api } from '../boot/api';
import routes from 'src/router/routes';
export { Path } from 'src/router/routes';
export { getHeaderName, buildTransferPageLink } from 'src/router/utils';

Expand Down Expand Up @@ -38,22 +37,5 @@ export default route<StateInterface>(function (/* { store, ssrContext } */) {
history: createHistory(process.env.MODE === 'ssr' ? void 0 : process.env.VUE_ROUTER_BASE),
});

// TODO - remove after the portal v3 is live.
Router.beforeEach((to, from, next) => {
// Prevent accessing to dApp staking pages if v3 is deployed to a node, but not supported by UI
const networksSupportV3 = ['development', 'shibuya-testnet', 'custom-node', 'shiden'];
const isStakingV3 = $api?.query.hasOwnProperty('dappStaking');
const dontNavigateToDappStaking =
to.path.includes('/dapp-staking') &&
!to.path.includes('/maintenance') &&
!networksSupportV3.includes(to.params?.network?.toString());

if (isStakingV3 && dontNavigateToDappStaking) {
next({ path: Path.DappStaking + Path.Maintenance });
} else {
next();
}
});

return Router;
});
8 changes: 1 addition & 7 deletions src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import XvmTransfer from 'pages/XvmTransfer.vue';
import { endpointKey, getNetworkName } from 'src/config/chainEndpoints';
import { LOCAL_STORAGE } from 'src/config/localStorage';
import Store from 'src/pages/DappStaking.vue';
import StakingTop from 'components/dapp-staking/StakingTop.vue';
import Dashboard from 'src/pages/Dashboard.vue';
import RegisterDapp from 'src/pages/RegisterDapp.vue';
import StakeManage from 'src/pages/StakeManage.vue';
Expand Down Expand Up @@ -153,12 +152,7 @@ const routes: RouteRecordRaw[] = [
},
{
path: 'discover',
component:
networkParam === '/development' ||
networkParam === '/shibuya-testnet' ||
networkParam === '/shiden'
? DiscoverV3
: StakingTop,
component: DiscoverV3,
},
{
path: 'owner',
Expand Down
Loading