Skip to content

Commit

Permalink
Revert "yauheni/74383/ converting app.jsx in account to functional co…
Browse files Browse the repository at this point in the history
…mponent (binary-com#6282)" (binary-com#6612)

This reverts commit e1fc3e8.
  • Loading branch information
carolsachdeva authored and adrienne-deriv committed Oct 7, 2022
1 parent 27973c3 commit cfa790f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 56 deletions.
2 changes: 1 addition & 1 deletion packages/account/build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function (env) {
context: path.resolve(__dirname, '../src'),
devtool: IS_RELEASE ? undefined : 'eval-cheap-module-source-map',
entry: {
account: path.resolve(__dirname, '../src', 'index.tsx'),
account: path.resolve(__dirname, '../src', 'index.js'),
'accept-risk-config': 'Configs/accept-risk-config',
'account-limits': 'Components/account-limits',
'address-details': 'Components/address-details',
Expand Down
28 changes: 28 additions & 0 deletions packages/account/src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import { setWebsocket } from '@deriv/shared';
import Routes from 'Containers/routes.jsx';
import ResetTradingPassword from 'Containers/reset-trading-password.jsx';
import { MobxContentProvider } from 'Stores/connect';
import initStore from 'Stores/init-store';

class App extends React.Component {
constructor(props) {
super(props);
const {
passthrough: { WS, root_store },
} = props;
this.root_store = initStore(root_store, WS);
setWebsocket(WS);
}

render() {
return (
<MobxContentProvider store={this.props.passthrough.root_store}>
<Routes />
<ResetTradingPassword />
</MobxContentProvider>
);
}
}

export default App;
28 changes: 0 additions & 28 deletions packages/account/src/App.tsx

This file was deleted.

10 changes: 10 additions & 0 deletions packages/account/src/Stores/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default class RootStore {
constructor(core_store) {
this.client = core_store.client;
this.common = core_store.common;
this.ui = core_store.ui;
this.gtm = core_store.gtm;
this.rudderstack = core_store.rudderstack;
this.pushwoosh = core_store.pushwoosh;
}
}
26 changes: 0 additions & 26 deletions packages/account/src/Stores/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { makeLazyLoader, moduleLoader } from '@deriv/shared';
import { Loading } from '@deriv/components';

const App = makeLazyLoader(
() => moduleLoader(() => import(/* webpackChunkName: "account-app", webpackPreload: true */ './App')),
() => moduleLoader(() => import(/* webpackChunkName: "account-app", webpackPreload: true */ './App.jsx')),
() => <Loading />
)();

Expand Down

0 comments on commit cfa790f

Please sign in to comment.