import { useStorage } from "@plasmohq/storage/hook"; import classNames from "classnames"; import { getFaviconWithGoogleS2 } from "@/helpers/utils"; import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import Icon from "./Icon"; interface Props { shortcut: Shortcut; } const ShortcutView = (props: Props) => { const { shortcut } = props; const [domain] = useStorage("domain", ""); const favicon = getFaviconWithGoogleS2(shortcut.link); const handleShortcutLinkClick = () => { const shortcutLink = `${domain}/s/${shortcut.name}`; chrome.tabs.create({ url: shortcutLink }); }; return ( <>
{favicon ? ( ) : ( )}
); }; export default ShortcutView;