fix: use component displayName property

This commit is contained in:
Mo
2022-05-20 11:40:51 -05:00
parent 57ec49733d
commit e52e2daf39
12 changed files with 66 additions and 41 deletions

View File

@@ -43,7 +43,7 @@ export const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
}) => {
const [editors] = useState<SNComponent[]>(() =>
application.componentManager.componentsForArea(ComponentArea.Editor).sort((a, b) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1
return a.displayName.toLowerCase() < b.displayName.toLowerCase() ? -1 : 1
}),
)
const [groups, setGroups] = useState<EditorMenuGroup[]>([])