We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c704ae9 commit 6431572Copy full SHA for 6431572
components/about/scroll-logos.tsx
@@ -11,11 +11,12 @@ function ScrollLogos() {
11
const scrollContainer = scrollRef.current;
12
13
if (!scrollContainer) return;
14
- const totalWidth = scrollContainer.scrollWidth;
15
let currentScrollPosition = 0;
16
17
const startScrolling = () => {
18
const move = () => {
+ const totalWidth = scrollContainer.scrollWidth;
19
+
20
currentScrollPosition += 1; // move 1px per interval
21
if (currentScrollPosition >= totalWidth / 2) {
22
currentScrollPosition = 0; // reset to 0 when it reaches the end
0 commit comments