Skip to content

Commit

Permalink
fix: comments theme on load
Browse files Browse the repository at this point in the history
  • Loading branch information
paullj committed Jan 7, 2024
1 parent a65b1e1 commit 9f4bdad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Comments.astro
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ const { term } = Astro.props;
});
}

const giscusScript = document.getElementById("giscus-script") as HTMLScriptElement;
giscusScript.setAttribute(
"data-theme",
getUserPref() === "light" ? "noborder_light" : "noborder_dark",
);
setGiscusTheme();

document.addEventListener("theme-change", () => {
setGiscusTheme();
Expand Down

0 comments on commit 9f4bdad

Please sign in to comment.