Migrate Welcome to TypeScript

pull/21833/head
Germain Souquet 2021-07-15 15:45:36 +02:00
parent 3b5266071e
commit 54bfe8ec1e
3 changed files with 8 additions and 14 deletions

View File

@ -23,7 +23,7 @@ const DIV_ID = 'mx_recaptcha';
interface IProps {
sitePublicKey?: string;
onCaptchaResponse: () => void;
onCaptchaResponse: (response: string) => void;
}
interface IState {

View File

@ -160,13 +160,3 @@ export default class CountryDropdown extends React.Component<IProps, IState> {
</Dropdown>;
}
}
CountryDropdown.propTypes = {
className: PropTypes.string,
isSmall: PropTypes.bool,
// if isSmall, show +44 in the selected value
showPrefix: PropTypes.bool,
onOptionChange: PropTypes.func.isRequired,
value: PropTypes.string,
disabled: PropTypes.bool,
};

View File

@ -29,15 +29,19 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
// translatable strings for Welcome pages
_td("Sign in with SSO");
interface IProps {
}
@replaceableComponent("views.auth.Welcome")
export default class Welcome extends React.PureComponent {
constructor(props) {
export default class Welcome extends React.PureComponent<IProps> {
constructor(props: IProps) {
super(props);
CountlyAnalytics.instance.track("onboarding_welcome");
}
render() {
public render(): React.ReactNode {
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
const LanguageSelector = sdk.getComponent('auth.LanguageSelector');