lbry-desktop/ui/component/button/index.js
2021-07-01 15:40:13 -04:00

16 lines
596 B
JavaScript

import Button from './view';
import React, { forwardRef } from 'react';
import { connect } from 'react-redux';
import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
import { selectSyncFatalError } from 'redux/selectors/sync';
const mapStateToProps = (state) => ({
pathname: state.router.location.pathname,
emailVerified: selectUserVerifiedEmail(state),
user: selectUser(state),
fatal: selectSyncFatalError(state),
});
const ConnectedButton = connect(mapStateToProps)(Button);
export default forwardRef((props, ref) => <ConnectedButton {...props} myref={ref} />);