import React from "react"; import { useSelectionContext } from "../useSelection"; type AddressHighlighterProps = React.PropsWithChildren<{ address: string; }>; const AddressHighlighter: React.FC = ({ address, children, }) => { const [selection, setSelection] = useSelectionContext(); const select = () => { setSelection({ type: "address", content: address }); }; const deselect = () => { setSelection(null); }; return (
{children}
); }; export default React.memo(AddressHighlighter);