mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
Auth refactor part 3
This commit is contained in:
@@ -2,12 +2,12 @@ import React from 'react';
|
||||
import { Button } from 'plugin-api/beta/client/components/ui';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { showSignInDialog } from 'coral-embed-stream/src/actions/auth';
|
||||
import { showSignInDialog } from 'coral-embed-stream/src/actions/login';
|
||||
import t from 'coral-framework/services/i18n';
|
||||
|
||||
const SignInButton = ({ loggedIn, showSignInDialog }) => (
|
||||
const SignInButton = ({ currentUser, showSignInDialog }) => (
|
||||
<div className="talk-stream-auth-sign-in-button">
|
||||
{!loggedIn ? (
|
||||
{!currentUser ? (
|
||||
<Button id="coralSignInButton" onClick={showSignInDialog} full>
|
||||
{t('sign_in.sign_in_to_comment')}
|
||||
</Button>
|
||||
@@ -16,7 +16,7 @@ const SignInButton = ({ loggedIn, showSignInDialog }) => (
|
||||
);
|
||||
|
||||
const mapStateToProps = ({ auth }) => ({
|
||||
loggedIn: auth.loggedIn,
|
||||
currentUser: auth.user,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch =>
|
||||
|
||||
Reference in New Issue
Block a user