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

Function routerMemoryReducer

packages/shared/src/hooks/useRouterMemory.ts:17–29  ·  view source on GitHub ↗
(
  state: RouterMemoryState,
  action: {
    type: 'push';
    payload: RouterMemoryState;
  },
)

Source from the content-addressed store, hash-verified

15type RouterMemoryState = Omit<UseRouterMemory, 'push'>;
16
17const routerMemoryReducer = (
18 state: RouterMemoryState,
19 action: {
20 type: 'push';
21 payload: RouterMemoryState;
22 },
23): RouterMemoryState => {
24 if (action.type === 'push') {
25 return action.payload;
26 }
27
28 return state;
29};
30
31const createRouterInitialState = (): RouterMemoryState => {
32 return {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected