Skip to content

Commit f387b3d

Browse files
ZGiovasmartinkaintas
authored andcommitted
fix: pass route params to prevent errors related with ionic router
1 parent 3ef754e commit f387b3d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/popup/pages/FungibleTokens/TokenContainer.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
v-for="tab in tabs"
6060
:key="tab.routeName"
6161
:exact-path="tab.exact"
62-
:to="{ name: tab.routeName }"
62+
:to="{ name: tab.routeName, params: routeParams }"
6363
:text="tab.text"
6464
/>
6565
</Tabs>
@@ -151,6 +151,7 @@ export default defineComponent({
151151
setup() {
152152
const store = useStore();
153153
const route = useRoute();
154+
const { params: routeParams } = route;
154155
const { t } = useI18n();
155156
const { setTokenProps } = useTokenProps();
156157
@@ -265,6 +266,7 @@ export default defineComponent({
265266
convertedBalance,
266267
routeName,
267268
isMultisig,
269+
routeParams,
268270
};
269271
},
270272
});

src/popup/pages/Names/Auction.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<div class="auction-tabs">
55
<Tabs>
66
<Tab
7-
:to="{ name: 'auction-bid' }"
7+
:to="{ name: 'auction-bid', params: routeParams }"
88
:text="$t('pages.names.auctions.place-bid')"
99
exact-path
1010
/>
1111
<Tab
12-
:to="{ name: 'auction-history' }"
12+
:to="{ name: 'auction-history', params: routeParams }"
1313
:text="$t('pages.names.auctions.bid-history')"
1414
/>
1515
</Tabs>
@@ -20,6 +20,7 @@
2020
<IonRouterOutlet
2121
v-else
2222
class="auction-router"
23+
:name="name"
2324
/>
2425
</div>
2526
</ion-page>
@@ -35,7 +36,7 @@ import {
3536
} from 'vue';
3637
import BigNumber from 'bignumber.js';
3738
import { useStore } from 'vuex';
38-
import { useRouter } from 'vue-router';
39+
import { useRoute, useRouter } from 'vue-router';
3940
import { executeAndSetInterval } from '@/utils';
4041
import { aettosToAe } from '@/protocols/aeternity/helpers';
4142
import { useMiddleware, useUi } from '../../../composables';
@@ -61,6 +62,7 @@ export default defineComponent({
6162
const router = useRouter();
6263
6364
const { getMiddleware } = useMiddleware();
65+
const { params: routeParams } = useRoute();
6466
const { isAppActive } = useUi();
6567
6668
const loading = ref(true);
@@ -105,6 +107,7 @@ export default defineComponent({
105107
106108
return {
107109
loading,
110+
routeParams,
108111
};
109112
},
110113
});

src/popup/router/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
2-
RouteRecordRaw, createWebHashHistory,
2+
RouteRecordRaw,
33
} from 'vue-router';
4-
import { createRouter, createWebHistory } from '@ionic/vue-router';
4+
import { createRouter, createWebHashHistory, createWebHistory } from '@ionic/vue-router';
55
import { Dictionary } from '@/types';
66
import {
77
APP_LINK_WEB,

0 commit comments

Comments
 (0)