Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore: remove duplicated code
wzhudev3a8e45a81d0b
diff --git a/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx b/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsxindex 89f00a866a..5608115086 100644--- a/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx+++ b/packages/base-ui/src/controllers/ui/ui-desktop.controller.tsx@@ -140,23 +140,9 @@ function bootStrap(const root = createRoot(mountContainer);const ConnectedApp = connectInjector(App, injector);const desktopUIController = injector.get(IUIController) as IDesktopUIController;- const headerComponents = desktopUIController.getHeaderComponents();- const contentComponents = desktopUIController.getContentComponents();- const footerComponents = desktopUIController.getFooterComponents();- const sidebarComponents = desktopUIController.getSidebarComponents();const onRendered = (canvasElement: HTMLElement) => callback(canvasElement, mountContainer);- root.render(- <ConnectedApp- {...options}- headerComponents={headerComponents}- contentComponents={contentComponents}- onRendered={onRendered}- footerComponents={footerComponents}- sidebarComponents={sidebarComponents}- />- );-- const updateSubscription = desktopUIController.componentRegistered$.subscribe(() => {++ function render() {const headerComponents = desktopUIController.getHeaderComponents();const contentComponents = desktopUIController.getContentComponents();const footerComponents = desktopUIController.getFooterComponents();@@ -166,12 +152,15 @@ function bootStrap({...options}headerComponents={headerComponents}contentComponents={contentComponents}+ onRendered={onRendered}footerComponents={footerComponents}sidebarComponents={sidebarComponents}- onRendered={onRendered}/>);- });+ }++ const updateSubscription = desktopUIController.componentRegistered$.subscribe(render);+ render();return toDisposable(() => {root.unmount();