Skip to content

Commit

Permalink
fix(website): animation scrolling errors (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
dave | d1onys1us authored Dec 20, 2022
1 parent 0c274a2 commit 97d093b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/website/src/components/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export default function Hero() {
// Enlarges and decreases the opacity of the taikoGeom image upon scroll
if (typeof window !== "undefined") {
const changeTaikoGeom = () => {
// only do animation on home page
if (window.location.pathname !== "/") {
return;
}

const taikoGeom = document.getElementById("taikoGeom");
const taikoGeomParent = document.getElementById("taikoGeomParent");
const elementHeight = window.pageYOffset;
Expand Down

0 comments on commit 97d093b

Please sign in to comment.