Add info snackbar for Firefox users

This commit is contained in:
Vishnu Nithin Reddy
2023-10-23 12:25:12 +05:30
parent 80a408063a
commit 7bedf8b47d

View File

@@ -169,6 +169,13 @@ export function useMenuAction(
// Firefox doesn't allow for reading clipboard data, hence the workaround
if (navigator.userAgent.includes("Firefox")) {
if (!e || !e.clipboardData) {
enqueueSnackbar(
`If you're on Firefox, please use the hotkey instead (Ctrl + V / Cmd + V).`,
{
variant: "info",
autoHideDuration: 7000,
}
);
enqueueSnackbar(`Cannot read clipboard data.`, {
variant: "error",
});