Skip to content

Commit

Permalink
🐛 fix(build): fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronlifton committed May 24, 2024
1 parent ba64740 commit 057f856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/LatestCodeList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ h5 {
</div>
<script>
import { isPaused, scrollLeft } from "$state/index";
import { animate, scroll } from "framer-motion/dom";

const onLoad = () => {
const codesContainer = document.querySelector(
Expand Down
5 changes: 3 additions & 2 deletions src/components/LatestCodeScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ const LatestCodeScroller: FC = () => {
const [scope, animate] = useAnimate();

useEffect(() => {
// @ts-ignore
scope.current = document.querySelector(
".codes-container",
) as HTMLDivElement;
}, []);
}, [scope]);

useEffect(() => {
if (!scope.current) return;
Expand All @@ -21,7 +22,7 @@ const LatestCodeScroller: FC = () => {
scope.current.scrollTo({ left });
},
});
}, [scrollLeftValue]);
}, [scope, animate, scrollLeftValue]);

return null;
};
Expand Down

0 comments on commit 057f856

Please sign in to comment.