Skip to content

Commit

Permalink
Debug log route when opening post
Browse files Browse the repository at this point in the history
  • Loading branch information
jstncno committed May 16, 2024
1 parent cd949bf commit 2386048
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/GridItem.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ const {class: className = '', postId, thumbnail} = Astro.props;
const inner = this.querySelector('img');
const postId = this.dataset.post;
if (inner && postId) {
inner.addEventListener('click', () => navigate(postId));
inner.addEventListener('click', () => open(postId));
}
}
}

function open(route: string) {
console.debug(route);
navigate(route);
}

customElements.define('grid-item-container', GridItemContainer);
</script>

0 comments on commit 2386048

Please sign in to comment.