import React, { useCallback } from "react"; import { Box } from "native-base"; import { openLink } from "@gooddollar/web3sdk-v2"; import BasePressable from "./BasePressable"; import { Image } from "../images"; import { linksNew } from "../constants"; import { TransText } from "../layout"; type LearnButtonType = { icon?: any; label?: string; link?: string; type: keyof typeof linksNew; }; const LearnButton = ({ type }: LearnButtonType) => { const { link, label, icon } = linksNew[type]; const openNotionTab = useCallback(async () => { if (link) { await openLink(link, "_blank"); } }, [link]); return ( ); }; export default LearnButton;