/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import React, { useCallback } from "react"; import { SafeAnchor } from "../SafeAnchor/SafeAnchor"; import { actionCreators as ac, actionTypes as at } from "common/Actions.mjs"; export const PersonalizedCard = ({ dispatch, handleDismiss, handleClick, handleBlock, messageData, }) => { const wavingFox = "chrome://newtab/content/data/content/assets/waving-fox.svg"; const onDismiss = useCallback(() => { handleDismiss(); handleBlock(); }, [handleDismiss, handleBlock]); const onToggleClick = useCallback( elementId => { dispatch({ type: at.SHOW_PERSONALIZE }); dispatch(ac.UserEvent({ event: "SHOW_PERSONALIZE" })); handleClick(elementId); }, [dispatch, handleClick] ); return ( ); };