import React , { memo , FunctionComponent } from "react" ; import { Tab } from "../types" ; interface Props { data : Tab ; onClick : ( id : string ) => void ; } const TabListButton = ( { data , onClick } ) => { return ( < button className = "full-width" onClick = { ( ) => onClick ( data . id ) } > { data . info ?. name } < /button>); } ; export default memo ( TabListButton ) ;