forked from Berry-Dash/launcher
Disable rightclick menu
This commit is contained in:
@@ -13,6 +13,12 @@ export default function App () {
|
|||||||
return () => window.removeEventListener('hashchange', onHashChange)
|
return () => window.removeEventListener('hashchange', onHashChange)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handler = (e: MouseEvent) => e.preventDefault()
|
||||||
|
document.addEventListener('contextmenu', handler)
|
||||||
|
return () => document.removeEventListener('contextmenu', handler)
|
||||||
|
}, [])
|
||||||
|
|
||||||
function renderContent() {
|
function renderContent() {
|
||||||
if (hash === "#installs") {
|
if (hash === "#installs") {
|
||||||
return <Installs />
|
return <Installs />
|
||||||
|
|||||||
Reference in New Issue
Block a user