Support right click to use file context menu

This commit is contained in:
Dane Everitt 2020-07-11 11:12:59 -07:00
parent 6188b9287c
commit 117c1b1778
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 94 additions and 49 deletions

View file

@ -1,6 +1,6 @@
import { useEffect, useRef } from 'react';
export default (eventName: string, handler: any, element: any = window) => {
export default (eventName: string, handler: (e: Event | CustomEvent | UIEvent | any) => void, element: any = window) => {
const savedHandler = useRef<any>(null);
useEffect(() => {