admin dashboard
This commit is contained in:
1 parent
2ff76ffda5
commit
7c7bb45446
15 files changed
+440
-116
No files matched your search
@@ -23,7 +23,7 @@ export function LiveBlogTicker({
|
||||
const [scrollPosition, setScrollPosition] = useState(0);
|
||||
const tickerRef = useRef<HTMLDivElement>(null);
|
||||
const contentRef = useRef<HTMLDivElement>(null);
|
||||
const animationRef = useRef<number>();
|
||||
const animationRef = useRef<number | undefined>(undefined);
|
||||
|
||||
// Calculate total width needed for scrolling
|
||||
const [totalWidth, setTotalWidth] = useState(0);
|
||||
@@ -55,7 +55,7 @@ export function LiveBlogTicker({
|
||||
|
||||
// Reset when scrolled past content
|
||||
if (newPos > totalWidth) {
|
||||
newPos = -tickerRef.current?.offsetWidth || 0;
|
||||
newPos = -(tickerRef.current?.offsetWidth || 0);
|
||||
}
|
||||
|
||||
return newPos;
|
||||
|
||||
Reference in new issue
Block a user