MCPcopy Index your code
hub / github.com/winfunc/opcode / checkScrollButtons

Function checkScrollButtons

src/components/TabManager.tsx:227–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225
226 // Check scroll buttons visibility
227 const checkScrollButtons = () => {
228 const container = scrollContainerRef.current;
229 if (!container) return;
230
231 const { scrollLeft, scrollWidth, clientWidth } = container;
232 setShowLeftScroll(scrollLeft > 0);
233 setShowRightScroll(scrollLeft + clientWidth < scrollWidth - 1);
234 };
235
236 useEffect(() => {
237 checkScrollButtons();

Callers 1

TabManagerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected