import { Tooltip } from "@mui/joy"; import classNames from "classnames"; import copy from "copy-to-clipboard"; import toast from "react-hot-toast"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import { absolutifyLink, getFaviconWithGoogleS2 } from "../helpers/utils"; import useViewStore from "../stores/v1/view"; import Icon from "./Icon"; import ShortcutActionsDropdown from "./ShortcutActionsDropdown"; import VisibilityIcon from "./VisibilityIcon"; interface Props { shortcut: Shortcut; } const ShortcutView = (props: Props) => { const { shortcut } = props; const { t } = useTranslation(); const viewStore = useViewStore(); const shortcutLink = absolutifyLink(`/s/${shortcut.name}`); const favicon = getFaviconWithGoogleS2(shortcut.link); const handleCopyButtonClick = () => { copy(shortcutLink); toast.success("Shortcut link copied to clipboard."); }; return ( <>