mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Add login api
This commit is contained in:
@@ -1,18 +1,26 @@
|
||||
import { RouteComponentProps } from "react-router-dom"
|
||||
import { useDispatch, useSelector, shallowEqual } from "react-redux"
|
||||
import React, { memo } from "react"
|
||||
import { Helmet } from "react-helmet"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
import { AppState } from "../../store"
|
||||
import LoginForm from "../../components/LoginForm/LoginForm"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
export type Props = RouteComponentProps
|
||||
|
||||
const RegisterPage: React.FC<Props> = (): JSX.Element => (
|
||||
<div className={styles.loginPage}>
|
||||
<div className={styles.loginContent}>
|
||||
<Helmet title="RegisterPage" />
|
||||
<LoginForm />
|
||||
const RegisterPage: React.FC<Props> = (): JSX.Element => {
|
||||
const dispatch = useDispatch()
|
||||
const loginError = useSelector((state: AppState) => state.volunteerLogin.error, shallowEqual)
|
||||
|
||||
return (
|
||||
<div className={styles.loginPage}>
|
||||
<div className={styles.loginContent}>
|
||||
<Helmet title="RegisterPage" />
|
||||
<LoginForm dispatch={dispatch} error={loginError || ""} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
export default memo(RegisterPage)
|
||||
|
Reference in New Issue
Block a user