@@ -2,23 +2,24 @@ import { Form, Formik } from 'formik'
22import { useTranslation } from 'react-i18next'
33import { useDispatch , useSelector } from 'react-redux'
44import { useLocation } from 'react-router-dom'
5+ import styled from 'styled-components'
56import * as Yup from 'yup'
67
78import { login } from '../../redux/authSlice'
89import { useIsDesktop } from '../../utils/useBreakpoint'
910import { Checkbox , Input , PasswordInput } from '../form/FormikWrappers'
1011import AboutSection from '../mobile/AboutSection'
1112import Button from '../ui/Button'
13+ import FormButtons from '../ui/FormButtons'
1214import LabeledRow from '../ui/LabeledRow'
1315import { AuthPage } from '../ui/PageTemplate'
1416import AuthLinks from './AuthLinks'
15- import {
16- FormButtonWrapper ,
17- FormCheckboxWrapper ,
18- FormInputWrapper ,
19- } from './AuthWrappers'
2017import { withAuthRedirect } from './withAuthRedirect'
2118
19+ const RememberMeRow = styled . div `
20+ margin-block-start: 1em;
21+ `
22+
2223const SignInPage = ( ) => {
2324 const isDesktop = useIsDesktop ( )
2425 const { isLoading } = useSelector ( ( state ) => state . auth )
@@ -48,30 +49,30 @@ const SignInPage = () => {
4849 >
4950 { ( { dirty, isValid } ) => (
5051 < Form >
51- < FormInputWrapper >
52+ < div >
5253 < Input
5354 name = "email"
5455 type = "text"
5556 label = { t ( 'glossary.email' ) }
5657 autoComplete = "off"
5758 />
5859 < PasswordInput name = "password" label = { t ( 'glossary.password' ) } />
59- </ FormInputWrapper >
60+ </ div >
6061
61- < FormCheckboxWrapper >
62+ < RememberMeRow >
6263 < LabeledRow
6364 label = {
6465 < label htmlFor = "remember_me" > { t ( 'users.remember_me' ) } </ label >
6566 }
6667 left = { < Checkbox id = "remember_me" /> }
6768 />
68- </ FormCheckboxWrapper >
69+ </ RememberMeRow >
6970
70- < FormButtonWrapper >
71+ < FormButtons >
7172 < Button disabled = { ! dirty || ! isValid || isLoading } type = "submit" >
7273 { t ( 'users.sign_in' ) }
7374 </ Button >
74- </ FormButtonWrapper >
75+ </ FormButtons >
7576 </ Form >
7677 ) }
7778 </ Formik >
0 commit comments