ava.js 578 B

1234567891011121314
  1. import React from "react";
  2. import { connect } from "react-redux";
  3. import icon from '../icon.png'
  4. function AvaLogo({px , mrgn , link }) {
  5. // Import result is the URL of your image
  6. return <img src= {link ? ('http://localhost:3000/' + link) : icon} className = 'ava' style = {{width: px , marginRight:mrgn , borderRadius:"50%"}} />;
  7. }
  8. const ConnectedAvaLogo = connect(state => ({link:state?.promise?.findUser?.payload?.data?.UserFindOne?.avatar?.url}))(AvaLogo)
  9. //'http://localhost:3000/images/5d6600e2254cff050d32c6967bcf3104'
  10. export default ConnectedAvaLogo