Skip to content

Commit

Permalink
fix: update page content correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Sep 18, 2024
1 parent 3b9cf63 commit c9b8401
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions pages/credits.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,16 @@
await loadLazyData();
});
watch(() => route.query.page, async () => {
loadLazyData();
});
const onPage = async (event: PageState) => {
await navigateTo({
path: '/credits',
query: {
page: event.page + 1,
},
});
await loadLazyData();
};
</script>
8 changes: 6 additions & 2 deletions pages/probes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@
}
});
watch([ () => route.query.page, () => route.params.id ], async ([ newPage, newId ], [ oldPage, oldId ]) => {
if (newPage !== oldPage && !oldId && !newId) {
loadLazyData();
}
});
const loadProbeData = async (id: string) => {
try {
const probe = await $directus.request(readItem('gp_adopted_probes', id));
Expand All @@ -264,8 +270,6 @@
page: event.page + 1,
},
});
await loadLazyData();
};
// PROBE DETAILS
Expand Down
3 changes: 1 addition & 2 deletions pages/tokens.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,11 @@
page: event.page + 1,
},
});
await loadLazyData();
};
watch(() => route.query.page, async () => {
resetState();
loadLazyData();
});
// TOKEN DETAILS
Expand Down

0 comments on commit c9b8401

Please sign in to comment.