Skip to content

Commit

Permalink
Merge pull request #419 from moonbitlang/zhiyuan/cursour-wait-route
Browse files Browse the repository at this point in the history
feat: make cursor waiting when route
  • Loading branch information
bzy-debug authored Jan 13, 2025
2 parents 64b23b7 + 2976781 commit d189bf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moonbit-tour/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function getRouteDataHref(href: string) {

async function getRouteData(href: string) {
const url = getRouteDataHref(href);
document.querySelector("html")!.classList.add("cursor-wait");
const res = await fetch(url);
document.querySelector("html")!.classList.remove("cursor-wait");
return await res.json();
}

Expand Down

0 comments on commit d189bf5

Please sign in to comment.