Skip to content

Commit

Permalink
fix: showing the balance view without needing to refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
krlz16 committed Jun 4, 2024
1 parent 1b25c01 commit 91cf097
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/DataPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
data () {
return {
storedTitle: '',
storedParamAddress: null,
storedRouteName: null,
PAGE_COLORS
}
},
Expand Down Expand Up @@ -300,11 +300,11 @@ export default {
const { module, action, params } = this
const key = this.reqKey
if (!module || !action) return
const paramsAddress = this.$route.params?.address
const routeName = this.$route.name
// If the parameters are the same when the router changes, we do not request the address information.
if (this.storedParamAddress !== paramsAddress) {
if (this.storedRouteName !== routeName) {
// use Date for a random info
this.storedParamAddress = paramsAddress || new Date()
this.storedRouteName = routeName || new Date()
return this.fetchRouteData({ action, params, module, key })
}
},
Expand Down
5 changes: 4 additions & 1 deletion src/styles/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@
}
}
}

.Account.Balance .data-item {
padding: 12px 24px 28px;
border-radius: 12px;
}
.data-item {
background-color: $newbw_800;
.items {
Expand Down

0 comments on commit 91cf097

Please sign in to comment.