Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4933 | Rev 5755 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4933 Rev 5697
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React from "react"
2
import React from 'react'
3
import { NavLink, Switch, Route, withRouter } from "react-router-dom"
3
import { NavLink, Switch, Route, withRouter } from 'react-router-dom'
4
import { connect } from "react-redux"
-
 
5
import { addNotification } from "../../../redux/notification/notification.actions"
-
 
6
import Login from "./login/Login"
4
import Login from './login/Login'
7
import Signup from "./signup/Signup"
5
import Signup from './signup/Signup'
8
import ForgotPassword from "./forgot-password/ForgotPassword"
6
import ForgotPassword from './forgot-password/ForgotPassword'
Línea 9... Línea 7...
9
 
7
 
10
const SigninSection = (props) => {
8
const SigninSection = ({
11
  // props captchakey
9
  captchaKey,
12
  const { captchaKey, facebookOauth, twitterOauth, googleOauth, aes, defaultNetwork } =
10
  facebookOauth,
13
    props.backendVars
-
 
14
 
11
  twitterOauth,
-
 
12
  googleOauth,
15
  // redux destructuring
13
  aes,
16
  const { addNotification } = props
14
  defaultNetwork,
17
  
15
}) => {
18
  return (
16
  return (
19
    <>
17
    <>
20
      <ul className="sign-control">
18
      <ul className="sign-control">
21
        <li>
19
        <li>
Línea 52... Línea 50...
52
        <Switch>
50
        <Switch>
53
          <Route exact path="/signin">
51
          <Route exact path="/signin">
54
            <Login
52
            <Login
55
              defaultNetwork={defaultNetwork}
53
              defaultNetwork={defaultNetwork}
56
              captchaKey={captchaKey}
54
              captchaKey={captchaKey}
57
              addNotification={addNotification}
-
 
58
              facebookOauth={facebookOauth}
55
              facebookOauth={facebookOauth}
59
              twitterOauth={twitterOauth}
56
              twitterOauth={twitterOauth}
60
              googleOauth={googleOauth}
57
              googleOauth={googleOauth}
61
              aes={aes}
58
              aes={aes}
62
            />
59
            />
63
          </Route>
60
          </Route>
64
          <Route exact path="/signup">
61
          <Route exact path="/signup">
65
            <Signup
-
 
66
              captchaKey={captchaKey}
62
            <Signup captchaKey={captchaKey} aes={aes} />
67
              addNotification={addNotification}
-
 
68
              aes={aes}
-
 
69
            />
-
 
70
          </Route>
63
          </Route>
71
          <Route exact path="/forgot-password">
64
          <Route exact path="/forgot-password">
72
            <ForgotPassword
-
 
73
              captchaKey={captchaKey}
65
            <ForgotPassword captchaKey={captchaKey} aes={aes} />
74
              addNotification={addNotification}
-
 
75
              aes={aes}
-
 
76
            />
-
 
77
          </Route>
66
          </Route>
78
        </Switch>
67
        </Switch>
79
      </div>
68
      </div>
80
    </>
69
    </>
81
  )
70
  )
82
}
71
}
Línea 83... Línea -...
83
 
-
 
84
const mapDispatchToProps = {
-
 
85
  addNotification: (notification) => addNotification(notification),
-
 
86
}
-
 
87
 
-
 
88
export default connect(null, mapDispatchToProps)(withRouter(SigninSection))
72
 
-
 
73
export default withRouter(SigninSection)