-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove meteor.startup from jump-to-search-message
- Loading branch information
1 parent
726cfbe
commit 9633377
Showing
4 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
apps/meteor/client/components/message/toolbar/useJumpToSearchMessageAction.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useEffect } from 'react'; | ||
|
||
import { MessageAction } from '../../../../app/ui-utils/client/lib/MessageAction'; | ||
import { setMessageJumpQueryStringParameter } from '../../../lib/utils/setMessageJumpQueryStringParameter'; | ||
|
||
export const useJumpToSearchMessageAction = () => { | ||
useEffect(() => { | ||
MessageAction.addButton({ | ||
id: 'jump-to-search-message', | ||
icon: 'jump', | ||
label: 'Jump_to_message', | ||
context: ['search'], | ||
async action(_, { message }) { | ||
setMessageJumpQueryStringParameter(message._id); | ||
}, | ||
order: 100, | ||
group: 'message', | ||
}); | ||
|
||
return () => { | ||
MessageAction.removeButton('jump-to-search-message'); | ||
}; | ||
}, []); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
apps/meteor/client/startup/actionButtons/jumpToSearchMessage.ts
This file was deleted.
Oops, something went wrong.