import * as React from "react"; import { linkTarget } from "../helpers/utilities"; import { trackGoal } from "fathom-client"; export const Buttons = ({ className = "", buttons, parentField = "" }) => { return (
{buttons && buttons.map(function (button, index) { const element = ( { if (button.fathomId) { trackGoal(button.fathomId, 0); } }} target={linkTarget(button.link)} key={index} data-tinafield={`${parentField}.${index}`} > { button.label } ); return element; })}
); };