import { Link } from "@awsui/components-react"; import React, { ReactNode } from "react"; import { useDispatch } from "react-redux"; import { LearnMoreLinks } from "../models/tools"; import { openTools } from "../store/actions/tools"; interface Props { heading: string; mainContent: ReactNode; learnMoreLinks: LearnMoreLinks[]; } export const InfoLink: React.FC = React.memo(({ heading, mainContent, learnMoreLinks }) => { const dispatch = useDispatch(); return ( { event.preventDefault(); event.stopPropagation(); dispatch( openTools({ isOpen: true, info: { heading, mainContent, learnMoreLinks } }) ); }} > Info ); });