Skip to content

Commit

Permalink
chore: Add for add/remove pages
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller committed Jul 30, 2024
1 parent 48e4f62 commit 209bec8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/router/nav-guards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ function applyPoolPageRedirects(router: Router): Router {
router.beforeEach((to, from, next) => {
if (to.name === 'pool') {
window.location.href = `https://balancer.fi/pools/${networkSlugV3}/v2/${to.params.id}`;
} else if (to.name === 'add-liquidity') {
window.location.href = `https://balancer.fi/pools/${networkSlugV3}/v2/${to.params.id}/add-liquidity`;
} else if (to.name === 'withdraw') {
window.location.href = `https://balancer.fi/pools/${networkSlugV3}/v2/${to.params.id}/remove-liquidity`;
} else next();
});
return router;
Expand Down

0 comments on commit 209bec8

Please sign in to comment.