From d1ea0fa81b47e705ffb2d9574bfccd9de2abf61e Mon Sep 17 00:00:00 2001 From: t1enne Date: Sun, 22 May 2022 14:19:39 +0200 Subject: [PATCH] Destructured props --- web/components/action-buttons/ActionButton.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/components/action-buttons/ActionButton.tsx b/web/components/action-buttons/ActionButton.tsx index bce8cae26..15535dbd5 100644 --- a/web/components/action-buttons/ActionButton.tsx +++ b/web/components/action-buttons/ActionButton.tsx @@ -8,10 +8,8 @@ interface Props { action: ExternalAction; } -export default function ActionButton(props: Props) { +export default function ActionButton({action: { url, title, description, icon, openExternally }}: Props) { const [showModal, setShowModal] = useState(false); - const { action } = props; - const { url, title, description, icon, color, openExternally } = action; const buttonClicked = () => { if (openExternally) { @@ -27,7 +25,6 @@ export default function ActionButton(props: Props) { type="primary" className={`${s.button}`} onClick={buttonClicked} - style={{ backgroundColor: color }} > {description} {title}