@@ -143,6 +143,7 @@ const updateRouteQuery = () => {
143143 .join (" ," ),
144144 ... (filters .from ? { from: filters .from } : {}),
145145 ... (filters .to ? { to: filters .to } : {}),
146+ page: page .value ,
146147 },
147148 })
148149}
@@ -282,16 +283,17 @@ const sort = reactive({
282283 dir: " desc" ,
283284})
284285
285- const page = ref (route .query .page ? parseInt (route .query .page ) : 1 )
286- const pages = computed (() => Math .ceil (count .value / 20 ))
286+ const page = ref (route .query .page ? parseInt (route .query .page ) < 1 ? 1 : parseInt (route .query .page ) : 1 )
287+ const limit = ref (20 )
288+ const handleNextCondition = ref (false )
287289
288290const findPFB = ref (false )
289291
290292const getTransactions = async () => {
291293 isRefetching .value = true
292294
293295 const { data } = await fetchTransactions ({
294- limit: 20 ,
296+ limit: limit . value ,
295297 offset: (page .value - 1 ) * 20 ,
296298 sort: sort .dir ,
297299 sort_by: sort .by ,
@@ -310,6 +312,7 @@ const getTransactions = async () => {
310312 })
311313 transactions .value = data .value
312314
315+ handleNextCondition .value = transactions .value .length < limit .value
313316 isLoaded .value = true
314317 isRefetching .value = false
315318}
@@ -342,7 +345,7 @@ watch(
342345 () => page .value ,
343346 async () => {
344347 getTransactions ()
345- router . replace ({ query : { page : page . value } } )
348+ updateRouteQuery ( )
346349 },
347350)
348351
@@ -424,7 +427,7 @@ const handleNext = () => {
424427 < Text size= " 12" weight= " 600" color= " primary" > Page {{ comma (page) }} < / Text >
425428 < / Button>
426429
427- < Button @click= " handleNext" type= " secondary" size= " mini" : disabled= " !transactions.length " >
430+ < Button @click= " handleNext" type= " secondary" size= " mini" : disabled= " handleNextCondition " >
428431 < Icon name= " arrow-right" size= " 12" color= " primary" / >
429432 < / Button>
430433 < / Flex>
@@ -704,7 +707,7 @@ const handleNext = () => {
704707 < NuxtLink : to= " `/tx/${tx.hash}`" >
705708 < Flex align= " center" >
706709 < Text size= " 12" weight= " 600" color= " primary" mono class = " table_column_alias" >
707- {{ $getDisplayName (" addresses" , tx .signers [0 ]. hash ) }}
710+ {{ $getDisplayName (" addresses" , " " , tx .signers [0 ]) }}
708711 < / Text >
709712 < / Flex>
710713 < / NuxtLink>
0 commit comments