Move modal to components, password pages to user

This commit is contained in:
Tom Russell 2019-08-23 14:16:40 +01:00
parent 7d3e59a0ed
commit 616bc676a3
6 changed files with 10 additions and 10 deletions

View File

@ -22,8 +22,8 @@ import Login from './user/login';
import MyAccountPage from './user/my-account';
import SignUp from './user/signup';
import ForgottenPassword from './forgotten-password';
import PasswordReset from './password-reset';
import ForgottenPassword from './user/forgotten-password';
import PasswordReset from './user/password-reset';
import { parseCategoryURL } from '../parse';

View File

@ -1,6 +1,6 @@
import React, { FormEvent, ChangeEvent } from 'react';
import InfoBox from './info-box';
import ErrorBox from './error-box';
import InfoBox from '../components/info-box';
import ErrorBox from '../components/error-box';
interface ForgottenPasswordState {
success: boolean;
@ -24,7 +24,7 @@ export default class ForgottenPassword extends React.Component<{}, ForgottenPass
const { name, value } = event.currentTarget;
this.setState({ [name]: value } as any);
}
async handleSubmit(event: FormEvent) {
event.preventDefault();
this.setState({ error: undefined, success: undefined });
@ -81,4 +81,4 @@ export default class ForgottenPassword extends React.Component<{}, ForgottenPass
</article>
)
}
}
}

View File

@ -2,7 +2,7 @@ import React, { Component, FormEvent } from 'react';
import { Link, Redirect } from 'react-router-dom';
import PropTypes from 'prop-types';
import ConfirmationModal from '../confirmation-modal';
import ConfirmationModal from '../components/confirmation-modal';
import ErrorBox from '../components/error-box';
class MyAccountPage extends Component<any, any> { // TODO: add proper types

View File

@ -1,7 +1,7 @@
import React, { ChangeEvent, FormEvent } from 'react';
import { RouteComponentProps, Redirect } from 'react-router';
import ErrorBox from './error-box';
import ErrorBox from '../components/error-box';
import { Link } from 'react-router-dom';
interface PasswordResetState {
@ -88,7 +88,7 @@ export default class PasswordReset extends React.Component<RouteComponentProps,
return <Redirect to="/my-account.html" />;
}
return (
<article>
<section className="main-col">
<h1 className="h2">Forgotten password</h1>
@ -119,4 +119,4 @@ export default class PasswordReset extends React.Component<RouteComponentProps,
</article>
)
}
}
}