Skip to content

Commit bea176f

Browse files
committed
clean up unused
1 parent 2933949 commit bea176f

1 file changed

Lines changed: 1 addition & 29 deletions

File tree

src/core/packages/chrome/browser-components/src/shared/chrome_hooks.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -248,21 +248,12 @@ export function useAppMenu() {
248248
return useObservable(appMenu$, undefined);
249249
}
250250

251-
/**
252-
* Returns the current legacy action menu mount point, or `undefined` if none is set.
253-
* @deprecated Legacy action menus use imperative mount points. Prefer `chrome.setAppMenu()`.
254-
*/
255-
export function useCurrentActionMenu(): MountPoint | undefined {
256-
const { application } = useChromeComponentsDeps();
257-
return useObservable(application.currentActionMenu$, undefined);
258-
}
259-
260251
/**
261252
* Whether a legacy action menu mount point is currently set.
262253
* @deprecated Legacy action menus use imperative mount points. Prefer `chrome.setAppMenu()`.
263254
*/
264255
export function useHasLegacyActionMenu(): boolean {
265-
return !!useCurrentActionMenu();
256+
return !!useInternalLegacyActionMenu();
266257
}
267258

268259
/** Whether the current app menu (registered via `chrome.setAppMenu()`) has items configured. */
@@ -306,26 +297,7 @@ export function useHasInlineAppHeader(): boolean {
306297
return useObservable(inlineAppHeader$, false);
307298
}
308299

309-
export function useInternalBasePath(): IBasePath {
310-
return useChromeService().componentDeps.basePath;
311-
}
312-
313300
export function useInternalLegacyActionMenu(): MountPoint | undefined {
314301
const { legacyActionMenu$ } = useChromeService().componentDeps;
315302
return useObservable(legacyActionMenu$, undefined);
316303
}
317-
318-
export function useInternalHasLegacyActionMenu(): boolean {
319-
return !!useInternalLegacyActionMenu();
320-
}
321-
322-
/**
323-
* Like {@link useHasAppMenu} but legacy menu reads {@link useChromeService}.componentDeps
324-
* instead of {@link useChromeComponentsDeps}. Safe where only ChromeServiceProvider exists
325-
* (e.g. management apps rendering AppHeader inline).
326-
*/
327-
export function useInternalHasAppMenu(): boolean {
328-
const hasLegacy = useInternalHasLegacyActionMenu();
329-
const hasConfig = useHasAppMenuConfig();
330-
return hasLegacy || hasConfig;
331-
}

0 commit comments

Comments
 (0)