Migrate AuthHeader to TypeScript

This commit is contained in:
Germain Souquet 2021-07-15 15:21:33 +02:00
parent 59316e4820
commit 5783a38207

View file

@ -16,17 +16,16 @@ limitations under the License.
*/ */
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types';
import * as sdk from '../../../index'; import * as sdk from '../../../index';
import { replaceableComponent } from "../../../utils/replaceableComponent"; import { replaceableComponent } from "../../../utils/replaceableComponent";
@replaceableComponent("views.auth.AuthHeader") interface IProps {
export default class AuthHeader extends React.Component { disableLanguageSelector?: boolean;
static propTypes = { }
disableLanguageSelector: PropTypes.bool,
};
render() { @replaceableComponent("views.auth.AuthHeader")
export default class AuthHeader extends React.Component<IProps> {
public render(): React.ReactNode {
const AuthHeaderLogo = sdk.getComponent('auth.AuthHeaderLogo'); const AuthHeaderLogo = sdk.getComponent('auth.AuthHeaderLogo');
const LanguageSelector = sdk.getComponent('views.auth.LanguageSelector'); const LanguageSelector = sdk.getComponent('views.auth.LanguageSelector');