mirror of
https://github.com/aykhans/slash-e.git
synced 2025-09-07 17:50:44 +00:00
feat: use react-hot-toast
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Tooltip } from "@mui/joy";
|
||||
import copy from "copy-to-clipboard";
|
||||
import { useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { UNKNOWN_ID } from "../helpers/consts";
|
||||
import { shortcutService, workspaceService } from "../services";
|
||||
import { useAppSelector } from "../store";
|
||||
@@ -8,7 +9,6 @@ import { unknownWorkspace, unknownWorkspaceUser } from "../store/modules/workspa
|
||||
import { absolutifyLink } from "../helpers/utils";
|
||||
import { showCommonDialog } from "./Alert";
|
||||
import Icon from "./Icon";
|
||||
import toastHelper from "./Toast";
|
||||
import Dropdown from "./common/Dropdown";
|
||||
import CreateShortcutDialog from "./CreateShortcutDialog";
|
||||
|
||||
@@ -38,7 +38,7 @@ const ShortcutListView: React.FC<Props> = (props: Props) => {
|
||||
const handleCopyButtonClick = (shortcut: Shortcut) => {
|
||||
const workspace = workspaceService.getWorkspaceById(workspaceId);
|
||||
copy(absolutifyLink(`/${workspace?.name}/${shortcut.name}`));
|
||||
toastHelper.error("Shortcut link copied to clipboard.");
|
||||
toast.success("Shortcut link copied to clipboard.");
|
||||
};
|
||||
|
||||
const handleEditShortcutButtonClick = (shortcut: Shortcut) => {
|
||||
|
Reference in New Issue
Block a user