Abstract notif component for auth pages.
This commit is contained in:
parent
01d7d61efb
commit
035b02bd24
@ -1,8 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from "react";
|
||||
import { partial } from 'lodash';
|
||||
import { Notifs } from 'redux-notifications';
|
||||
import { Toast, Icon } from 'UI';
|
||||
import { Icon } from 'UI';
|
||||
|
||||
let component = null;
|
||||
|
||||
@ -92,7 +91,6 @@ export default class AuthenticationPage extends React.Component {
|
||||
|
||||
if (window.netlifyIdentity) {
|
||||
return <section className="nc-gitGatewayAuthenticationPage-root">
|
||||
<Notifs CustomComponent={Toast} />
|
||||
<Icon className="nc-githubAuthenticationPage-logo" size="500px" type="netlify-cms"/>
|
||||
<button className="nc-githubAuthenticationPage-button" onClick={this.handleIdentity}>
|
||||
Login with Netlify Identity
|
||||
|
@ -1,8 +1,7 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import Authenticator from 'Lib/netlify-auth';
|
||||
import { Notifs } from 'redux-notifications';
|
||||
import { Icon, Toast } from 'UI';
|
||||
import { Icon } from 'UI';
|
||||
|
||||
export default class AuthenticationPage extends React.Component {
|
||||
static propTypes = {
|
||||
@ -36,7 +35,6 @@ export default class AuthenticationPage extends React.Component {
|
||||
return (
|
||||
<section className="nc-githubAuthenticationPage-root">
|
||||
<Icon className="nc-githubAuthenticationPage-logo" size="500px" type="netlify-cms"/>
|
||||
<Notifs CustomComponent={Toast} />
|
||||
{loginError && <p>{loginError}</p>}
|
||||
<button
|
||||
className="nc-githubAuthenticationPage-button"
|
||||
|
@ -75,6 +75,7 @@ class App extends React.Component {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Notifs CustomComponent={Toast} />
|
||||
{
|
||||
React.createElement(backend.authComponent(), {
|
||||
onLogin: this.handleLogin.bind(this),
|
||||
|
Loading…
x
Reference in New Issue
Block a user