MCPcopy
hub / github.com/brimdata/zui / create

Function create

apps/zui/src/js/state/Tabs/flows.ts:10–24  ·  view source on GitHub ↗
(url = "/", id = nanoid())

Source from the content-addressed store, hash-verified

8
9export const create =
10 (url = "/", id = nanoid()): Thunk<string> =>
11 (dispatch) => {
12 dispatch(SessionQueries.init(id))
13 dispatch(Tabs.add(id))
14 // move to tabHistories.restore(id, url)
15 const history = global.tabHistories.get(id)
16 if (history) {
17 if (history.location.pathname !== url) history.push(url)
18 } else {
19 global.tabHistories.create(id, [{pathname: url}], 0)
20 }
21 // end
22 dispatch(Tabs.activate(id))
23 return id
24 }
25
26export const createQuerySession =
27 (): Thunk<string> =>

Callers 3

createQuerySessionFunction · 0.85
queries.tsFile · 0.85
useTitleFormFunction · 0.85

Calls 6

createMethod · 0.65
initMethod · 0.45
addMethod · 0.45
getMethod · 0.45
pushMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected