Skip to content

Commit

Permalink
Update Portfolio.svelte
Browse files Browse the repository at this point in the history
refactor
ikhsan3adi committed Dec 22, 2023
1 parent 11dbb14 commit c72e159
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/lib/components/sections/Portfolio.svelte
Original file line number Diff line number Diff line change
@@ -32,22 +32,20 @@
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
setTimeout(() => {
setTimeout(async () => {
console.log('Fetching projects');
setTimeout(async () => {
for (const project of initialProjects) {
try {
await projectService.fetchProject({ project, fetch });
} catch (_) {
break;
}
for (const project of initialProjects) {
try {
await projectService.fetchProject({ project, fetch });
} catch (_) {
break;
}
}, 350);
}
isIntersecting = true;
observer.disconnect();
}, 750);
}, 500);
});
});

0 comments on commit c72e159

Please sign in to comment.