Files
astuto/app/javascript/components/TenantSignUp/index.tsx

53 lines
1.3 KiB
TypeScript
Raw Normal View History

2022-07-18 10:47:54 +02:00
import * as React from 'react';
import { Provider } from 'react-redux';
2024-01-22 14:45:48 +01:00
import { Store } from 'redux';
2022-07-18 10:47:54 +02:00
import createStoreHelper from '../../helpers/createStore';
import TenantSignUp from '../../containers/TenantSignUp';
import { State } from '../../reducers/rootReducer';
2024-01-22 14:45:48 +01:00
import { IOAuthJSON, oAuthJSON2JS } from '../../interfaces/IOAuth';
2022-07-18 10:47:54 +02:00
interface Props {
2024-01-22 14:45:48 +01:00
oAuths: Array<IOAuthJSON>;
oAuthLoginCompleted: boolean;
oauthUserEmail?: string;
oauthUserName?: string;
baseUrl: string;
2022-07-18 10:47:54 +02:00
authenticityToken: string;
}
class TenantSignUpRoot extends React.Component<Props> {
store: Store<State, any>;
constructor(props: Props) {
super(props);
this.store = createStoreHelper();
}
render() {
2024-01-22 14:45:48 +01:00
const {
oAuths,
oAuthLoginCompleted,
oauthUserEmail,
oauthUserName,
baseUrl,
authenticityToken,
} = this.props;
2022-07-18 10:47:54 +02:00
return (
<Provider store={this.store}>
<TenantSignUp
2024-01-22 14:45:48 +01:00
oAuthLoginCompleted={oAuthLoginCompleted}
oauthUserEmail={oauthUserEmail}
oauthUserName={oauthUserName}
oAuths={oAuths.map(oAuth => oAuthJSON2JS(oAuth))}
baseUrl={baseUrl}
2022-07-18 10:47:54 +02:00
authenticityToken={authenticityToken}
/>
</Provider>
);
}
}
export default TenantSignUpRoot;