mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Some more minor fixes
This commit is contained in:
@@ -8,7 +8,7 @@ export default function AuthTitle({ title }: { title: MessageDescriptor }) {
|
||||
{msg => (
|
||||
<span>
|
||||
{msg}
|
||||
<Helmet title={msg} />
|
||||
<Helmet title={msg as string} />
|
||||
</span>
|
||||
)}
|
||||
</Message>
|
||||
|
||||
@@ -86,7 +86,7 @@ export default class ChangeEmail extends React.Component<Props, State> {
|
||||
<Message {...messages.changeEmailTitle}>
|
||||
{pageTitle => (
|
||||
<h3 className={styles.violetTitle}>
|
||||
<Helmet title={pageTitle} />
|
||||
<Helmet title={pageTitle as string} />
|
||||
{pageTitle}
|
||||
</h3>
|
||||
)}
|
||||
|
||||
@@ -8,7 +8,7 @@ import ChangePassword from 'app/components/profile/changePassword/ChangePassword
|
||||
|
||||
describe('<ChangePassword />', () => {
|
||||
it('renders two <Input /> components', () => {
|
||||
const component = shallow(<ChangePassword onSubmit={() => {}} />);
|
||||
const component = shallow(<ChangePassword onSubmit={async () => {}} />);
|
||||
|
||||
expect(component.find('Input'), 'to satisfy', { length: 2 });
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import {
|
||||
@@ -9,20 +8,18 @@ import {
|
||||
Form,
|
||||
FormModel,
|
||||
} from 'app/components/ui/form';
|
||||
import { BackButton } from 'app/components/profile/ProfileForm';
|
||||
|
||||
import styles from 'app/components/profile/profileForm.scss';
|
||||
import { BackButton } from '../ProfileForm';
|
||||
import styles from '../profileForm.scss';
|
||||
import messages from './ChangePassword.intl.json';
|
||||
|
||||
export default class ChangePassword extends Component {
|
||||
static displayName = 'ChangePassword';
|
||||
interface Props {
|
||||
form: FormModel;
|
||||
onSubmit: (form: FormModel) => Promise<void>;
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
form: PropTypes.instanceOf(FormModel),
|
||||
onSubmit: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
static get defaultProps() {
|
||||
export default class ChangePassword extends React.Component<Props> {
|
||||
static get defaultProps(): Partial<Props> {
|
||||
return {
|
||||
form: new FormModel(),
|
||||
};
|
||||
@@ -41,7 +38,7 @@ export default class ChangePassword extends Component {
|
||||
<Message {...messages.changePasswordTitle}>
|
||||
{pageTitle => (
|
||||
<h3 className={styles.title}>
|
||||
<Helmet title={pageTitle} />
|
||||
<Helmet title={pageTitle as string} />
|
||||
{pageTitle}
|
||||
</h3>
|
||||
)}
|
||||
@@ -1,26 +1,21 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import React from 'react';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
import { Input, Button, Form, FormModel } from 'app/components/ui/form';
|
||||
import { BackButton } from 'app/components/profile/ProfileForm';
|
||||
import styles from 'app/components/profile/profileForm.scss';
|
||||
|
||||
import styles from '../profileForm.scss';
|
||||
import messages from './ChangeUsername.intl.json';
|
||||
|
||||
export default class ChangeUsername extends Component {
|
||||
static displayName = 'ChangeUsername';
|
||||
interface Props {
|
||||
username: string;
|
||||
form: FormModel;
|
||||
onChange: (name: string) => void;
|
||||
onSubmit: (form: FormModel) => Promise<void>;
|
||||
}
|
||||
|
||||
static propTypes = {
|
||||
username: PropTypes.string.isRequired,
|
||||
form: PropTypes.instanceOf(FormModel),
|
||||
onChange: PropTypes.func.isRequired,
|
||||
onSubmit: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
static get defaultProps() {
|
||||
export default class ChangeUsername extends React.Component<Props> {
|
||||
static get defaultProps(): Partial<Props> {
|
||||
return {
|
||||
form: new FormModel(),
|
||||
};
|
||||
@@ -39,7 +34,7 @@ export default class ChangeUsername extends Component {
|
||||
<Message {...messages.changeUsernameTitle}>
|
||||
{pageTitle => (
|
||||
<h3 className={styles.title}>
|
||||
<Helmet title={pageTitle} />
|
||||
<Helmet title={pageTitle as string} />
|
||||
{pageTitle}
|
||||
</h3>
|
||||
)}
|
||||
@@ -80,7 +75,7 @@ export default class ChangeUsername extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
onUsernameChange = event => {
|
||||
onUsernameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
this.props.onChange(event.target.value);
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ class MultiFactorAuth extends React.Component<{
|
||||
<Message {...messages.mfaTitle}>
|
||||
{pageTitle => (
|
||||
<h3 className={styles.title}>
|
||||
<Helmet title={pageTitle} />
|
||||
<Helmet title={pageTitle as string} />
|
||||
{pageTitle}
|
||||
</h3>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user