Skip to content

Commit 727b625

Browse files
author
Constance
authored
Move renderHeaderActions back into mount useEffect + update tests (#80861) (#80886)
1 parent dc236c7 commit 727b625

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe('WorkplaceSearchConfigured', () => {
7676
shallow(<WorkplaceSearchConfigured />);
7777

7878
expect(initializeAppData).not.toHaveBeenCalled();
79+
expect(mockKibanaValues.renderHeaderActions).not.toHaveBeenCalled();
7980
});
8081

8182
it('renders ErrorState', () => {

x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ export const WorkplaceSearchConfigured: React.FC<IInitialAppData> = (props) => {
3838
useEffect(() => {
3939
if (!hasInitialized) {
4040
initializeAppData(props);
41+
renderHeaderActions(WorkplaceSearchHeaderActions);
4142
}
4243
}, [hasInitialized]);
4344

44-
renderHeaderActions(WorkplaceSearchHeaderActions);
45-
4645
return (
4746
<Switch>
4847
<Route path={SETUP_GUIDE_PATH}>

0 commit comments

Comments
 (0)