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

Function saveScrollPosition

packages/shared/src/lib/scrollRestoration.ts:44–48  ·  view source on GitHub ↗
(
  asPath: string,
  position: number,
  kind: ScrollPositionKind = 'page',
)

Source from the content-addressed store, hash-verified

42};
43
44export const saveScrollPosition = (
45 asPath: string,
46 position: number,
47 kind: ScrollPositionKind = 'page',
48): void => saveHistoryEntryScrollPosition(getScrollKey(asPath, kind), position);
49
50// The next route change switches a view of the page on screen in place (a
51// replace of the entry on screen, by a tab), so nothing is saved or restored

Callers 4

FeedWidgetRailFunction · 0.90
usePostModalNavigationFunction · 0.90
restoreScrollPositionFunction · 0.85

Calls 2

getScrollKeyFunction · 0.85

Tested by

no test coverage detected