You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/NewsTicker/NewsTicker.tsx
+13-37Lines changed: 13 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,24 @@
1
-
"use client";
1
+
import{useEffect,useRef,useState}from"react";
2
2
3
-
importgsapfrom"gsap";
4
-
import{useEffect,useRef}from"react";
3
+
// Static mission statements
4
+
constnews=[
5
+
"Welcome to LAP Docs, our mission is to provide you with the best possible tutorials that is easy to understand and follow. I hope you enjoy your stay with us and our tutorials actually help you learn something new.",
6
+
"Our Motto: Simplicity in Tech",
7
+
"Our Goal: Simplifying tech for everyone",
8
+
];
5
9
6
10
exportdefaultfunctionNewsTicker(){
7
-
consttickerRef=useRef<HTMLDivElement|null>(null);
8
-
9
-
// Static mission statements
10
-
constnews=[
11
-
"Welcome to LAP Docs, our mission is to provide you with the best possible tutorials that is easy to understand and follow. I hope you enjoy your stay with us and our tutorials actually help you learn something new.",
12
-
"Our Motto: Simplicity in Tech",
13
-
"Our Goal: Simplifying tech for everyone",
14
-
];
15
-
16
-
useEffect(()=>{
17
-
constticker=tickerRef.current;
18
-
19
-
if(ticker&&news.length>0){
20
-
consttickerWidth=ticker.scrollWidth/2;// Half because we are duplicating items
0 commit comments