Skip to content

Commit

Permalink
Commento loading onRouteDidUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
kordwarshuis committed Jul 13, 2023
1 parent 5eef5ff commit 372f8f7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions clientModules/commento.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ function commento() {

}

// export function onRouteDidUpdate({ location, previousLocation }) {
// // Don't execute if we are still on the same page; the lifecycle may be fired
// // because the hash changes (e.g. when navigating between headings)
// // if (location.pathname === previousLocation?.pathname) return;
// commento();
// }
export function onRouteUpdate({ location, previousLocation }) {
export function onRouteDidUpdate({ location, previousLocation }) {
// Don't execute if we are still on the same page; the lifecycle may be fired
// because the hash changes (e.g. when navigating between headings)
// if (location.pathname === previousLocation?.pathname) return;
setTimeout(() => {
commento();
}, 500);
commento();
}
// export function onRouteUpdate({ location, previousLocation }) {
// // Don't execute if we are still on the same page; the lifecycle may be fired
// // because the hash changes (e.g. when navigating between headings)
// // if (location.pathname === previousLocation?.pathname) return;
// setTimeout(() => {
// commento();
// }, 500);
// }

0 comments on commit 372f8f7

Please sign in to comment.