Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4423 | Rev 5697 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4933 stevensc 1
/* eslint-disable react/prop-types */
2
import React from "react"
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"
7
import Signup from "./signup/Signup"
8
import ForgotPassword from "./forgot-password/ForgotPassword"
1 www 9
 
10
const SigninSection = (props) => {
11
  // props captchakey
4423 stevensc 12
  const { captchaKey, facebookOauth, twitterOauth, googleOauth, aes, defaultNetwork } =
4933 stevensc 13
    props.backendVars
1 www 14
 
15
  // redux destructuring
4933 stevensc 16
  const { addNotification } = props
17
 
1 www 18
  return (
4933 stevensc 19
    <>
1 www 20
      <ul className="sign-control">
21
        <li>
22
          {/* <a href="#">Entrar</a> */}
23
          <NavLink to="/signin" activeClassName="current">
24
            Entrar
25
          </NavLink>
26
        </li>
27
        <li>
28
          {/* <a
29
            href="<?php echo $this->url('signup', ['uniqueid' => $uniqueid])?>"
30
            title=""
31
          >
32
            Registrarse
33
          </a> */}
34
          <NavLink to="/signup" activeClassName="current">
35
            Registrarse
36
          </NavLink>
37
        </li>
38
        <li>
39
          {/* <a
40
            href="<?php echo $this->url('forgot-password', ['uniqueid' => $uniqueid]) ?>"
41
            title=""
42
          >
43
            Olvide mi clave
44
          </a> */}
45
          <NavLink to="/forgot-password" activeClassName="current">
46
            Olvide mi clave
47
          </NavLink>
48
        </li>
49
      </ul>
50
 
51
      <div className="sign_in_sec current">
52
        <Switch>
53
          <Route exact path="/signin">
54
            <Login
4423 stevensc 55
              defaultNetwork={defaultNetwork}
1 www 56
              captchaKey={captchaKey}
57
              addNotification={addNotification}
58
              facebookOauth={facebookOauth}
59
              twitterOauth={twitterOauth}
60
              googleOauth={googleOauth}
61
              aes={aes}
62
            />
63
          </Route>
64
          <Route exact path="/signup">
65
            <Signup
66
              captchaKey={captchaKey}
67
              addNotification={addNotification}
68
              aes={aes}
69
            />
70
          </Route>
71
          <Route exact path="/forgot-password">
72
            <ForgotPassword
73
              captchaKey={captchaKey}
74
              addNotification={addNotification}
75
              aes={aes}
76
            />
77
          </Route>
78
        </Switch>
79
      </div>
4933 stevensc 80
    </>
81
  )
82
}
1 www 83
 
84
const mapDispatchToProps = {
85
  addNotification: (notification) => addNotification(notification),
4933 stevensc 86
}
1 www 87
 
4933 stevensc 88
export default connect(null, mapDispatchToProps)(withRouter(SigninSection))