Skip to content

Commit

Permalink
fix: update title display
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Sep 6, 2024
1 parent 6790af9 commit adbe59a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/context/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ export const useWorkspaceData = () => {
key: prefix,
selectable: false,
showAddButton: true,
children: Object.entries(file.serviceFunctions || {}).map(([key, value]) => ({
title: value.description || key,
key: [prefix, key].join('.'),
type: 'function',
showRemoveButton: true,
})),
children: Object.entries(file.serviceFunctions || {}).map(([key, value]) => {
const title = value.description ? `${key}(${value.description})` : key;
return {
title,
key: [prefix, key].join('.'),
type: 'function',
showRemoveButton: true,
};
}),
});
});

Expand Down

0 comments on commit adbe59a

Please sign in to comment.