Don't allow right click on library channel.

This commit is contained in:
Matthew Stratford 2021-01-30 17:46:11 +00:00
parent 4b75b5e72b
commit 820813e024

View file

@ -8,6 +8,7 @@ import * as MixerState from "../mixer/state";
import { Draggable } from "react-beautiful-dnd";
import { contextMenu } from "react-contexify";
import "./item.scss";
import { PLAYER_ID_PREVIEW } from "../mixer/audio";
export const TS_ITEM_MENU_ID = "SongMenu";
export const TS_ITEM_AUX_ID = "AuxMenu";
@ -47,6 +48,7 @@ export const Item = memo(function Item({
function openContextMenu(e: React.MouseEvent<HTMLDivElement, MouseEvent>) {
e.preventDefault();
if (column === PLAYER_ID_PREVIEW) return; // Don't let people right click in the library.
if (isTrack(x)) {
contextMenu.show({
id: TS_ITEM_MENU_ID,