You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Migrate Welcome to TypeScript
This commit is contained in:
@@ -23,7 +23,7 @@ const DIV_ID = 'mx_recaptcha';
|
|||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
sitePublicKey?: string;
|
sitePublicKey?: string;
|
||||||
onCaptchaResponse: () => void;
|
onCaptchaResponse: (response: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
|
|||||||
@@ -160,13 +160,3 @@ export default class CountryDropdown extends React.Component<IProps, IState> {
|
|||||||
</Dropdown>;
|
</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,
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -29,15 +29,19 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
|
|||||||
// translatable strings for Welcome pages
|
// translatable strings for Welcome pages
|
||||||
_td("Sign in with SSO");
|
_td("Sign in with SSO");
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@replaceableComponent("views.auth.Welcome")
|
@replaceableComponent("views.auth.Welcome")
|
||||||
export default class Welcome extends React.PureComponent {
|
export default class Welcome extends React.PureComponent<IProps> {
|
||||||
constructor(props) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
CountlyAnalytics.instance.track("onboarding_welcome");
|
CountlyAnalytics.instance.track("onboarding_welcome");
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
public render(): React.ReactNode {
|
||||||
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
|
const EmbeddedPage = sdk.getComponent('structures.EmbeddedPage');
|
||||||
const LanguageSelector = sdk.getComponent('auth.LanguageSelector');
|
const LanguageSelector = sdk.getComponent('auth.LanguageSelector');
|
||||||
|
|
||||||
Reference in New Issue
Block a user