MCPcopy Create free account
hub / github.com/anomalyco/opencode / emptyMessage

Function emptyMessage

packages/ui/src/components/list.tsx:243–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241 }
242
243 const emptyMessage = () => {
244 if (grouped.loading) return props.loadingMessage ?? i18n.t("ui.list.loading")
245 if (props.emptyMessage) return props.emptyMessage
246
247 const query = filter()
248 if (!query) return i18n.t("ui.list.empty")
249
250 const suffix = i18n.t("ui.list.emptyWithFilter.suffix")
251 return (
252 <>
253 <span>{i18n.t("ui.list.emptyWithFilter.prefix")}</span>
254 <span data-slot="list-filter">&quot;{query}&quot;</span>
255 <Show when={suffix}>
256 <span>{suffix}</span>
257 </Show>
258 </>
259 )
260 }
261
262 return (
263 <div data-component="list" classList={{ [props.class ?? ""]: !!props.class }}>

Callers 1

ListFunction · 0.85

Calls 1

filterFunction · 0.85

Tested by

no test coverage detected