MCPcopy Create free account
hub / github.com/anders-swanson/oracle-database-code-samples / scrollBehavior

Function scrollBehavior

website/src/router.ts:46–59  ·  view source on GitHub ↗
(to, from, savedPosition)

Source from the content-addressed store, hash-verified

44];
45
46export const scrollBehavior: RouterScrollBehavior = (to, from, savedPosition) => {
47 if (savedPosition) {
48 return savedPosition;
49 }
50 if (to.hash) {
51 return {
52 el: to.hash
53 };
54 }
55 if (to.path === from.path) {
56 return false;
57 }
58 return { top: 0 };
59};

Callers 1

router.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected