Skip to content

Commit

Permalink
PR feedback: unshift
Browse files Browse the repository at this point in the history
  • Loading branch information
Constance authored Apr 12, 2021
1 parent 032fc94 commit 08d2798
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ export const Result: React.FC<Props> = ({
})
: undefined;
if (shouldLinkToDetailPage && documentLink) {
actions.unshift({
const linkAction = {
onClick: () => KibanaLogic.values.navigateToUrl(documentLink),
title: i18n.translate('xpack.enterpriseSearch.appSearch.result.documentDetailLink', {
defaultMessage: 'Visit document details',
}),
iconType: 'eye',
});
};
actions = [linkAction, ...actions];
}

return (
Expand Down

0 comments on commit 08d2798

Please sign in to comment.