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

Function commit

packages/shared/src/hooks/useScrollRestoration.spec.ts:95–100  ·  view source on GitHub ↗
(entry: HistoryEntry, height: number)

Source from the content-addressed store, hash-verified

93// Next resets the scroll to the top when the destination commits, before any
94// effect runs.
95const commit = (entry: HistoryEntry, height: number) => {
96 mockRouter.asPath = entry.path;
97 setScrollY(0);
98 setPageHeight(height);
99 rerenderHook();
100};
101
102// A link: Next announces the change before it pushes the new entry.
103const navigate = (path: string, height: number): HistoryEntry => {

Callers 3

navigateFunction · 0.70
traverseFunction · 0.70

Calls 2

setPageHeightFunction · 0.85
setScrollYFunction · 0.70

Tested by

no test coverage detected