/* 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 { useSelector } from "react-redux"; import { actionCreators as ac, actionTypes as at } from "common/Actions.mjs"; import { FeatureHighlight } from "./FeatureHighlight"; export function WallpaperFeatureHighlight({ position, dispatch, handleDismiss, handleClick, handleBlock, }) { const onDismiss = useCallback(() => { handleDismiss(); handleBlock(); }, [handleDismiss, handleBlock]); const onToggleClick = useCallback( elementId => { dispatch({ type: at.SHOW_PERSONALIZE }); dispatch(ac.UserEvent({ event: "SHOW_PERSONALIZE" })); handleClick(elementId); onDismiss(); }, [dispatch, onDismiss, handleClick] ); // Extract the strings and feature ID from OMC const { messageData } = useSelector(state => state.Messages); return (
{messageData.content.cardTitle}
) : ( )} {messageData.content?.cardMessage ? ({messageData.content.cardMessage}
) : ( )} {messageData.content?.cardCta ? (