load feed of give records on home screen

This commit is contained in:
2023-06-11 20:37:34 -06:00
parent d5336dbf1b
commit 6daa515d19
9 changed files with 285 additions and 23 deletions

View File

@@ -14,6 +14,7 @@ export default class InfiniteScroll extends Vue {
readonly distance!: number;
private observer!: IntersectionObserver;
// 'mounted' hook runs after initial render
mounted() {
const options = {
root: this.$refs.scrollContainer as HTMLElement,
@@ -24,6 +25,7 @@ export default class InfiniteScroll extends Vue {
this.observer.observe(this.$refs.sentinel as HTMLElement);
}
// 'beforeUnmount' hook runs before unmounting the component
beforeUnmount() {
this.observer.disconnect();
}