forked from trent_larson/crowd-funder-for-time-pwa
Updates to fix merge and remove console.log
This commit is contained in:
@@ -40,23 +40,8 @@ export default class InfiniteScroll extends Vue {
|
|||||||
|
|
||||||
@Emit("reached-bottom")
|
@Emit("reached-bottom")
|
||||||
handleIntersection(entries: IntersectionObserverEntry[]) {
|
handleIntersection(entries: IntersectionObserverEntry[]) {
|
||||||
console.log("handleIntersection");
|
|
||||||
const entry = entries[0];
|
const entry = entries[0];
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
const distance = entry.boundingClientRect.top - entry.rootBounds.top;
|
|
||||||
console.log("distance: ", distance);
|
|
||||||
console.log("intersectionRatio", entry.intersectionRatio);
|
|
||||||
const sentinelPosition = (
|
|
||||||
this.$refs.sentinel as HTMLElement
|
|
||||||
).getBoundingClientRect();
|
|
||||||
// Access sentinel element's position properties
|
|
||||||
const sentinelTop = sentinelPosition.top;
|
|
||||||
console.log("sentinelTop", sentinelTop);
|
|
||||||
const scrollContainer = (
|
|
||||||
this.$refs.scrollContainer as HTMLElement
|
|
||||||
).getBoundingClientRect();
|
|
||||||
// Access scrollContainer properties or perform any necessary actions
|
|
||||||
console.log("scrollContainerTop", scrollContainer);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -176,8 +176,7 @@ export default class ProjectsView extends Vue {
|
|||||||
* @param payload is the flag from the InfiniteScroll indicating if it should load
|
* @param payload is the flag from the InfiniteScroll indicating if it should load
|
||||||
**/
|
**/
|
||||||
async loadMoreData(payload: boolean) {
|
async loadMoreData(payload: boolean) {
|
||||||
console.log(payload);
|
if (this.projects.length > 0 && payload) {
|
||||||
if (this.projects.length > 0) {
|
|
||||||
const latestProject = this.projects[this.projects.length - 1];
|
const latestProject = this.projects[this.projects.length - 1];
|
||||||
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`;
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`;
|
||||||
const token = await accessToken(this.current);
|
const token = await accessToken(this.current);
|
||||||
@@ -202,7 +201,6 @@ export default class ProjectsView extends Vue {
|
|||||||
* @param identity of the user
|
* @param identity of the user
|
||||||
**/
|
**/
|
||||||
async LoadProjects(identity: IIdentifier) {
|
async LoadProjects(identity: IIdentifier) {
|
||||||
console.log("LoadProjects");
|
|
||||||
const url = `${this.apiServer}/api/v2/report/plansByIssuer`;
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer`;
|
||||||
const token: string = await accessToken(identity);
|
const token: string = await accessToken(identity);
|
||||||
await this.dataLoader(url, token);
|
await this.dataLoader(url, token);
|
||||||
@@ -228,6 +226,7 @@ export default class ProjectsView extends Vue {
|
|||||||
if (!identity) {
|
if (!identity) {
|
||||||
throw new Error("No identity found.");
|
throw new Error("No identity found.");
|
||||||
}
|
}
|
||||||
|
this.current = identity;
|
||||||
this.LoadProjects(identity);
|
this.LoadProjects(identity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user