Skip to content

Commit

Permalink
Revert "fix(colors): fix colors and add ref"
Browse files Browse the repository at this point in the history
This reverts commit 8f19b44.
  • Loading branch information
schnogz committed Apr 20, 2020
1 parent 8f19b44 commit cac46c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ const validStrongPassword = value =>
/>
)

const SignupForm = ({
forwardedRef,
handleSubmit,
password,
passwordLength,
showForm
}) => {
const SignupForm = ({ handleSubmit, password, passwordLength, showForm }) => {
// @ts-ignore
let passwordScore = has('zxcvbn', window) ? window.zxcvbn(password).score : 0
return (
Expand Down Expand Up @@ -109,7 +103,6 @@ const SignupForm = ({
data-e2e='signupEmail'
disabled={!isSupportedBrowser}
name='email'
ref={forwardedRef}
validate={[required, validEmail]}
/>
</FormItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,13 @@ class RegisterContainer extends React.PureComponent<PropsType, StateType> {
showForm: false
}

inputRef = React.createRef<HTMLInputElement>()

onSubmit = () => {
const { authActions, email, password, language } = this.props
authActions.register(email, password, language)
}

toggleForm = () => {
this.setState({ showForm: true })
if (this.inputRef) {
// this.inputRef.current.focus()
// debugger
}
}

getInputRef = input => {
if (input) this.inputRef = input
}

render () {
Expand All @@ -45,7 +35,6 @@ class RegisterContainer extends React.PureComponent<PropsType, StateType> {
return (
<Register
busy={busy}
forwardedRef={this.inputRef}
onSubmit={this.onSubmit}
password={password}
passwordLength={passwordLength}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { LinkContainer } from 'react-router-bootstrap'
import Header from './Header'
import LinkExchangeAccount from './LinkExchangeAccount'
import media from 'services/ResponsiveService'
import React, { RefObject } from 'react'
import React from 'react'
import SignupForm from './SignupForm'
import styled, { DefaultTheme } from 'styled-components'

Expand Down Expand Up @@ -133,7 +133,7 @@ const ExchangeButton = styled(Button)`
border: none;
&:hover {
background-color: ${props => props.theme.black};
background-color: ${props => props.theme.grey900};
}
`

Expand Down Expand Up @@ -183,7 +183,6 @@ const Bottom = styled.div`

const Register = ({
busy,
forwardedRef,
goals,
handleSubmit,
invalid,
Expand Down Expand Up @@ -270,7 +269,6 @@ const Register = ({
</CardInfo>

<SignupForm
forwardedRef={forwardedRef}
handleSubmit={handleSubmit}
password={password}
passwordLength={passwordLength}
Expand Down Expand Up @@ -439,7 +437,6 @@ const Register = ({
type Props = {
busy: boolean
email: string
forwardedRef: RefObject<HTMLInputElement>
goals: Array<{ data: any; id: string; name: GoalsType }>
language: string
password: string
Expand Down

0 comments on commit cac46c3

Please sign in to comment.