MCPcopy Create free account
hub / github.com/dailydotdev/apps / update

Function update

packages/shared/src/hooks/useScrollbarWidth.ts:10–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8export function useScrollbarWidth(): void {
9 useEffect(() => {
10 const update = () => {
11 const width = window.innerWidth - document.documentElement.clientWidth;
12 document.documentElement.style.setProperty(
13 '--scrollbar-width',
14 `${width}px`,
15 );
16 };
17
18 update();
19 window.addEventListener('resize', update);

Callers 4

useScrollbarWidthFunction · 0.70
ProfileUserStackFunction · 0.50
ProfileUserHotTakesFunction · 0.50
atomWithLocalStorageFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected