Sha256: bd4b306621b7107648db3e3f25b2ca8c429d0623fcb0da0c297724ddfbf3edb9

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

import React from 'react';
import PropTypes from 'prop-types'
import { connect } from 'react-redux'

import {
  Form,
  FormCell,
  CellHeader,
  Label,
  CellBody,
  Input,
  ButtonArea,
  Button,
} from 'react-weui';

import { changeInput, resetPassword } from '../../actions'
import BasePage from './BasePage'

const ResetPassWordPage = ({ changeInput, resetPassword, ...props }) => {
  return (
    <BasePage {...props} title="ResetPassWord" desc="ResetPassWord"
      page={
        <div>
          <Form>
            <FormCell>
              <CellHeader>
                <Label>password</Label>
              </CellHeader>
              <CellBody>
                <Input name="pass" onChange={changeInput} type="password" placeholder="新パスワード" />
              </CellBody>
            </FormCell>
          </Form>
          <ButtonArea direction="horizontal">
            <Button type="primary" onClick={(e) => resetPassword(props.match.params.token, e)}>リセット</Button>
          </ButtonArea>
        </div>
      }
    />
  );
}

ResetPassWordPage.propTypes = {
  changeInput: PropTypes.func.isRequired,
  resetPassword: PropTypes.func.isRequired,
}

const mapDispatchToProps = dispatch => ({
  changeInput: e => dispatch(changeInput(e.target.name, e.target.value)),
  resetPassword: (token, e) => dispatch(resetPassword(token, e)),
})

export default connect(null, mapDispatchToProps)(ResetPassWordPage)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
weget-0.1.6 lib/weget/react/imports/ui/pages/ResetPasswordPage.js