mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-12 00:48:50 +01:00
Forgot to import
This commit is contained in:
parent
228c0e5028
commit
a78417ac60
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ import {
|
||||||
MenuHeader,
|
MenuHeader,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
} from '@szhsin/react-menu';
|
} from '@szhsin/react-menu';
|
||||||
|
import 'long-press-event';
|
||||||
import mem from 'mem';
|
import mem from 'mem';
|
||||||
import pThrottle from 'p-throttle';
|
import pThrottle from 'p-throttle';
|
||||||
import { memo } from 'preact/compat';
|
import { memo } from 'preact/compat';
|
||||||
|
@ -499,9 +500,9 @@ function Status({
|
||||||
});
|
});
|
||||||
setIsContextMenuOpen(true);
|
setIsContextMenuOpen(true);
|
||||||
}
|
}
|
||||||
statusRef.current.addEventListener('long-press', openContextMenu);
|
statusRef.current?.addEventListener?.('long-press', openContextMenu);
|
||||||
return () => {
|
return () => {
|
||||||
statusRef.current.removeEventListener('long-press', openContextMenu);
|
statusRef.current?.removeEventListener?.('long-press', openContextMenu);
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue