5151 >
5252 <div class =" animate__animated" :class =" isDisplay ? inAnimation : outAnimation" >
5353 <div class =" row--dapp" >
54- <div class =" column--dapp-name" >
54+ <div class =" column--dapp-name" @click = " goDappPageLink(dapp.address) " >
5555 <img class =" img--logo" :src =" dapp.iconUrl" :alt =" dapp.name" />
5656 <div class =" column--name" >
5757 <span class =" text--name" > {{ dapp.name }} </span >
@@ -96,6 +96,8 @@ import TokenBalance from 'src/components/common/TokenBalance.vue';
9696import { DappCombinedInfo , SmartContractState } from ' src/v2/models' ;
9797import { useStore } from ' src/store' ;
9898import { paginate } from ' @astar-network/astar-sdk-core' ;
99+ import { networkParam , Path } from ' src/router/routes' ;
100+ import { useRouter } from ' vue-router' ;
99101
100102enum Filter {
101103 tvl = ' dappStaking.stakingTvl' ,
@@ -111,6 +113,7 @@ interface Data {
111113 iconUrl: string ;
112114 name: string ;
113115 balance: string ;
116+ address: string ;
114117}
115118
116119const numItemsTablet = 8 ;
@@ -141,6 +144,7 @@ export default defineComponent({
141144 const isDisplay = ref <boolean >(true );
142145 const goToNext = ref <boolean >(true );
143146 const sortBy = ref <SortBy >(SortBy .amountHighToLow );
147+ const router = useRouter ();
144148
145149 const numItems = computed <number >(() =>
146150 width .value > screenSize .md ? numItemsTablet : numItemsMobile
@@ -153,6 +157,12 @@ export default defineComponent({
153157 );
154158 const isShiden = computed <boolean >(() => currentNetworkName .value === ' Shiden' );
155159
160+ const goDappPageLink = (address : string | undefined ): void => {
161+ const base = networkParam + Path .DappStaking + Path .Dapp ;
162+ const url = ` ${base }?dapp=${address ?.toLowerCase ()} ` ;
163+ router .push (url );
164+ };
165+
156166 const getDappStyle = (index : number ): string => {
157167 if (screenSize .md > width .value ) {
158168 return ' ' ;
@@ -205,6 +215,7 @@ export default defineComponent({
205215 return {
206216 iconUrl: it .dapp .iconUrl ,
207217 name: it .dapp .name ,
218+ address: it .dapp .address ,
208219 balance ,
209220 };
210221 } else {
@@ -268,6 +279,7 @@ export default defineComponent({
268279 changePage ,
269280 getDappStyle ,
270281 getBorderStyle ,
282+ goDappPageLink ,
271283 };
272284 },
273285});
0 commit comments