MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / sortByDisplayOrder

Function sortByDisplayOrder

frontend/app/workspace/widgets.tsx:41–50  ·  view source on GitHub ↗
(wmap: { [key: string]: WidgetConfigType })

Source from the content-addressed store, hash-verified

39}>;
40
41function sortByDisplayOrder(wmap: { [key: string]: WidgetConfigType }): WidgetConfigType[] {
42 if (wmap == null) {
43 return [];
44 }
45 const wlist = Object.values(wmap);
46 wlist.sort((a, b) => {
47 return (a["display:order"] ?? 0) - (b["display:order"] ?? 0);
48 });
49 return wlist;
50}
51
52type WidgetPropsType = {
53 widget: WidgetConfigType;

Callers 1

widgets.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected