You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
11 lines
373 B
TypeScript
11 lines
373 B
TypeScript
import * as React from 'react';
|
|
import { useCallback } from 'react';
|
|
import CommandService from '@joplin/lib/services/CommandService';
|
|
|
|
export default () => {
|
|
return useCallback((event: React.MouseEvent<HTMLDivElement>) => {
|
|
const noteId = event.currentTarget.getAttribute('data-id');
|
|
void CommandService.instance().execute('openNoteInNewWindow', noteId);
|
|
}, []);
|
|
};
|