From 93ee16760703066f022dc960bfe359368e9e2724 Mon Sep 17 00:00:00 2001 From: ingawei Date: Wed, 12 Oct 2022 23:40:59 -0700 Subject: [PATCH] fix manalinks --- web/components/manalink-card.tsx | 18 +++++++++--------- web/components/share-icon-button.tsx | 24 +++++++----------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/web/components/manalink-card.tsx b/web/components/manalink-card.tsx index 28be3278..b71b4e89 100644 --- a/web/components/manalink-card.tsx +++ b/web/components/manalink-card.tsx @@ -11,6 +11,7 @@ import { Claim, Manalink } from 'common/manalink' import { ShareIconButton } from './share-icon-button' import { useUserById } from 'web/hooks/use-user' import getManalinkUrl from 'web/get-manalink-url' +import { IconButton } from './button' export type ManalinkInfo = { expiresTime: number | null @@ -122,7 +123,7 @@ export function ManalinkCardFromView(props: { src="/logo-white.svg" /> - +
- + - + +
diff --git a/web/components/share-icon-button.tsx b/web/components/share-icon-button.tsx index 280bc293..86a554f5 100644 --- a/web/components/share-icon-button.tsx +++ b/web/components/share-icon-button.tsx @@ -5,32 +5,22 @@ import clsx from 'clsx' import { copyToClipboard } from 'web/lib/util/copy' import { ToastClipboard } from 'web/components/toast-clipboard' import { track } from 'web/lib/service/analytics' +import { IconButton } from './button' export function ShareIconButton(props: { - buttonClassName?: string - onCopyButtonClassName?: string toastClassName?: string children?: React.ReactNode iconClassName?: string copyPayload: string }) { - const { - buttonClassName, - onCopyButtonClassName, - toastClassName, - children, - iconClassName, - copyPayload, - } = props + const { toastClassName, children, iconClassName, copyPayload } = props const [showToast, setShowToast] = useState(false) return (
- + {showToast && }