MCPcopy Create free account
hub / github.com/emwalker/digraph / stateFor

Function stateFor

client/src/components/ui/SearchBox/TextInput/index.tsx:31–34  ·  view source on GitHub ↗
(queryInfo: QueryInfo)

Source from the content-addressed store, hash-verified

29const plugins = [mentionPlugin, singleLinePlugin]
30
31const stateFor = (queryInfo: QueryInfo) => {
32 if (queryInfo == null) return EditorState.createEmpty()
33 return EditorState.createWithContent(convertFromRaw(rawFromQuery(queryInfo, genKey)))
34}
35
36type Props = {
37 handleReturn: ReturnHandler,

Callers 1

TextInputFunction · 0.85

Calls 1

rawFromQueryFunction · 0.85

Tested by

no test coverage detected