textualize/frontend/utils/asyncClick.ts
Yehoshua Sandler 1631271b93
Replace native canvas implementation with Konva library (#2)
* style: spelling

* refact: canvases replaced with konva

* refact: area text calculated by words

* refact: moved konva files out of test dir
2023-06-27 08:42:44 -05:00

7 lines
160 B
TypeScript

const asyncClick = (e: React.MouseEvent, callback: (e: React.MouseEvent) => Promise<void>) => {
e.preventDefault()
callback(e)
}
export default asyncClick