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

62 lines
1.5 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;
2024-03-02 18:36:22 +01:00
astutoLogoImage: string;
pendingTenantImage: string;
2024-05-03 18:11:07 +02:00
trialPeriodDays: number;
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,
2024-03-02 18:36:22 +01:00
astutoLogoImage,
pendingTenantImage,
2024-01-22 14:45:48 +01:00
baseUrl,
2024-05-03 18:11:07 +02:00
trialPeriodDays,
2024-01-22 14:45:48 +01:00
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))}
2024-03-02 18:36:22 +01:00
astutoLogoImage={astutoLogoImage}
pendingTenantImage={pendingTenantImage}
2024-01-22 14:45:48 +01:00
baseUrl={baseUrl}
2024-05-03 18:11:07 +02:00
trialPeriodDays={trialPeriodDays}
2022-07-18 10:47:54 +02:00
authenticityToken={authenticityToken}
/>
</Provider>
);
}
}
export default TenantSignUpRoot;