Skip to content

Commit

Permalink
[ILM] Fix type check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Aug 27, 2020
1 parent 689b37c commit 9c4366a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('policy table', () => {
policies={policies}
history={scopedHistoryMock.create()}
navigateToApp={jest.fn()}
sendRequest={jest.fn()}
updatePolicies={jest.fn()}
/>
);
});
Expand All @@ -91,7 +91,7 @@ describe('policy table', () => {
policies={[]}
history={scopedHistoryMock.create()}
navigateToApp={jest.fn()}
sendRequest={jest.fn()}
updatePolicies={jest.fn()}
/>
);
const rendered = mountWithIntl(component);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const PolicyTable: React.FunctionComponent<Props & RouteComponentProps> =
policies={policies || []}
history={history}
navigateToApp={navigateToApp}
sendRequest={sendRequest}
updatePolicies={sendRequest}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@ import { reactRouterNavigate } from '../../../../../../../src/plugins/kibana_rea
import { PolicyFromES } from '../../services/policies/types';
import { filterItems } from '../../services';
import { TableContent } from './components/table_content';
import { UseRequestResponse } from '../../../../../../../src/plugins/es_ui_shared/public';

interface Props {
policies: PolicyFromES[];
history: RouteComponentProps['history'];
navigateToApp: ApplicationStart['navigateToApp'];
sendRequest: UseRequestResponse['sendRequest'];
updatePolicies: () => void;
}

export const PolicyTable: React.FunctionComponent<Props> = ({
policies,
history,
navigateToApp,
sendRequest,
updatePolicies,
}) => {
const [confirmModal, setConfirmModal] = useState<ReactNode | null>();
const [filter, setFilter] = useState<string>();
Expand Down Expand Up @@ -72,7 +71,7 @@ export const PolicyTable: React.FunctionComponent<Props> = ({
navigateToApp={navigateToApp}
setConfirmModal={setConfirmModal}
handleDelete={() => {
sendRequest();
updatePolicies();
setConfirmModal(null);
}}
history={history}
Expand Down

0 comments on commit 9c4366a

Please sign in to comment.