Skip to content

Commit

Permalink
[Enterprise Search] Make EntSearch app inputs explicit (#156562)
Browse files Browse the repository at this point in the history
## Summary

This moves the Enterprise Search inputs for the bootstrap `<App>` to be
explicit, rather than implicitly derived from what is and isn't excluded
from a destructured object. Hopefully this will avoid us accidentally
breaking the app because we changed the destructure or removed a
variable somewhere.
  • Loading branch information
sphilipse authored May 3, 2023
1 parent b5e8ab7 commit bceeec0
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions x-pack/plugins/enterprise_search/public/applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,19 @@ export const renderApp = (
},
{ config, data }: { config: ClientConfigType; data: ClientData }
) => {
const { access, features, publicUrl, errorConnectingMessage, readOnlyMode, ...initialData } =
data;
const {
access,
appSearch,
configuredLimits,
enterpriseSearchVersion,
errorConnectingMessage,
features,
kibanaVersion,
publicUrl,
readOnlyMode,
searchOAuth,
workplaceSearch,
} = data;
const { history } = params;
const { application, chrome, http, uiSettings } = core;
const { capabilities, navigateToUrl } = application;
Expand Down Expand Up @@ -114,7 +125,17 @@ export const renderApp = (
<CloudContext>
<Provider store={store}>
<Router history={params.history}>
<App access={productAccess} {...initialData} />
<App
access={productAccess}
appSearch={appSearch}
configuredLimits={configuredLimits}
enterpriseSearchVersion={enterpriseSearchVersion}
features={features}
kibanaVersion={kibanaVersion}
readOnlyMode={readOnlyMode}
searchOAuth={searchOAuth}
workplaceSearch={workplaceSearch}
/>
<Toasts />
</Router>
</Provider>
Expand Down

0 comments on commit bceeec0

Please sign in to comment.