lbry-desktop/ui/component/button/index.js

15 lines
497 B
JavaScript
Raw Normal View History

2018-03-26 23:32:43 +02:00
import Button from './view';
import React, { forwardRef } from 'react';
import { connect } from 'react-redux';
2021-06-18 00:52:21 +02:00
import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
2017-04-07 07:15:22 +02:00
2021-06-18 00:52:21 +02:00
const mapStateToProps = (state) => ({
pathname: state.router.location.pathname,
emailVerified: selectUserVerifiedEmail(state),
2021-06-18 00:52:21 +02:00
user: selectUser(state),
});
const ConnectedButton = connect(mapStateToProps)(Button);
export default forwardRef((props, ref) => <ConnectedButton {...props} myref={ref} />);