mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-17 21:53:03 +05:30
Enable bsod for testing and fixed errors due to lack of intl context
This commit is contained in:
parent
70dbf2ea6a
commit
c4eacca87d
@ -2,13 +2,17 @@ import React from 'react';
|
||||
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
|
||||
import { IntlProvider } from 'components/i18n';
|
||||
import appInfo from 'components/auth/appInfo/AppInfo.intl.json';
|
||||
import messages from './BSoD.intl.json';
|
||||
|
||||
import styles from './styles.scss';
|
||||
|
||||
export default function BSoD() {
|
||||
// TODO: probably it is better to render this view from the App view
|
||||
// to remove dependencies from store and IntlProvider
|
||||
export default function BSoD({store}) {
|
||||
return (
|
||||
<IntlProvider store={store}>
|
||||
<div className={styles.body}>
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.title}>
|
||||
@ -28,5 +32,6 @@ export default function BSoD() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</IntlProvider>
|
||||
);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export default function dispatchBsod(store = injectedStore) {
|
||||
onBsod && onBsod();
|
||||
|
||||
ReactDOM.render(
|
||||
<BSoD />,
|
||||
<BSoD store={store} />,
|
||||
document.getElementById('app')
|
||||
);
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ logger.init({
|
||||
sentryCdn: window.SENTRY_CDN
|
||||
});
|
||||
|
||||
import dispatchBsod from 'components/ui/bsod/dispatchBsod'; // TODO: remove after tests
|
||||
|
||||
const store = storeFactory();
|
||||
|
||||
bsodFactory(store, stopLoading);
|
||||
@ -47,6 +49,7 @@ Promise.all([
|
||||
<Router history={browserHistory} onUpdate={() => {
|
||||
restoreScroll();
|
||||
stopLoading();
|
||||
setTimeout(dispatchBsod, 0); // TODO: remove after tests
|
||||
}}>
|
||||
{routesFactory(store)}
|
||||
</Router>
|
||||
|
@ -11,8 +11,6 @@ import ActivationState from './ActivationState';
|
||||
import CompleteState from './CompleteState';
|
||||
import ResendActivationState from './ResendActivationState';
|
||||
|
||||
import dispatchBsod from 'components/ui/bsod/dispatchBsod';
|
||||
|
||||
export default class AuthFlow {
|
||||
constructor(actions) {
|
||||
if (typeof actions !== 'object') {
|
||||
|
Loading…
Reference in New Issue
Block a user