Skip to content

Commit

Permalink
Merge branch master of https://github.com/binary-com/deriv-app into p…
Browse files Browse the repository at this point in the history
…a-sign-up
  • Loading branch information
heorhi-deriv committed Nov 24, 2022
2 parents 09e63a0 + e09668e commit e703c77
Show file tree
Hide file tree
Showing 304 changed files with 69,929 additions and 36,282 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ packages/account/lib/
packages/components/.out
packages/components/src/components/icon/icons-manifest.js
packages/p2p/lib/
packages/appstore/dist/
packages/appstore/lib/
packages/appstore/.out
.env
nx-cloud.env

1 change: 0 additions & 1 deletion __mocks__/fileMock.js

This file was deleted.

92,611 changes: 68,874 additions & 23,737 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-i18next": "^11.11.0"
"react-router-dom": "^5.2.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/account/src/Components/Routes/binary-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import getRoutesConfig from 'Constants/routes-config';
import RouteWithSubRoutes from './route-with-sub-routes.jsx';

const BinaryRoutes = props => {
const { is_appstore, is_pre_appstore } = React.useContext(PlatformContext);
const { is_appstore } = React.useContext(PlatformContext);
return (
<React.Suspense
fallback={() => {
Expand All @@ -17,7 +17,7 @@ const BinaryRoutes = props => {
}}
>
<Switch>
{getRoutesConfig({ is_appstore, is_pre_appstore }).map((route, idx) => (
{getRoutesConfig({ is_appstore }).map((route, idx) => (
<RouteWithSubRoutes key={idx} {...route} {...props} />
))}
</Switch>
Expand Down
16 changes: 3 additions & 13 deletions packages/account/src/Constants/routes-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ import {
LoginHistory,
AccountClosed,
DeactivateAccount,
LanguageSettings,
} from 'Sections';

// Error Routes
const Page404 = React.lazy(() => moduleLoader(() => import(/* webpackChunkName: "404" */ 'Modules/Page404')));

// Order matters
const initRoutesConfig = ({ is_appstore, is_pre_appstore }) => [
const initRoutesConfig = ({ is_appstore }) => [
{
path: routes.account_closed,
component: AccountClosed,
Expand Down Expand Up @@ -59,15 +58,6 @@ const initRoutesConfig = ({ is_appstore, is_pre_appstore }) => [
component: FinancialAssessment,
getTitle: () => localize('Financial assessment'),
},
...(is_pre_appstore
? [
{
path: routes.languages,
component: LanguageSettings,
getTitle: () => localize('Languages'),
},
]
: []),
],
},
{
Expand Down Expand Up @@ -157,9 +147,9 @@ let routesConfig;
// For default page route if page/path is not found, must be kept at the end of routes_config array
const route_default = { component: Page404, getTitle: () => localize('Error 404') };

const getRoutesConfig = ({ is_appstore, is_pre_appstore }) => {
const getRoutesConfig = ({ is_appstore }) => {
if (!routesConfig) {
routesConfig = initRoutesConfig({ is_appstore, is_pre_appstore });
routesConfig = initRoutesConfig({ is_appstore });
routesConfig.push(route_default);
}
return routesConfig;
Expand Down
32 changes: 3 additions & 29 deletions packages/account/src/Containers/account.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import PropTypes from 'prop-types';
import React from 'react';
import { withRouter } from 'react-router-dom';
import { VerticalTab, FadeWrapper, PageOverlay, Loading, Text, Icon } from '@deriv/components';
import { VerticalTab, FadeWrapper, PageOverlay, Loading, Text } from '@deriv/components';
import { routes as shared_routes, isMobile, matchRoute, getSelectedRoute, PlatformContext } from '@deriv/shared';
import { localize } from '@deriv/translations';
import { connect } from 'Stores/connect';
import { flatten } from '../Helpers/flatten';
import AccountLimitInfo from '../Sections/Security/AccountLimits/account-limits-info.jsx';
import 'Styles/account.scss';
import { useHistory } from 'react-router';

const AccountLogout = ({ logout, history }) => {
return (
Expand All @@ -20,27 +19,7 @@ const AccountLogout = ({ logout, history }) => {
}}
>
<div className='dc-vertical-tab__header-group account__logout-tab'>
<Text size='xxs' weight='normal'>
{localize('Log out')}
</Text>
</div>
</div>
);
};

const TradingHubLogout = ({ logout }) => {
const history = useHistory();
return (
<div
className='dc-vertical-tab__header-account__logout-tab'
onClick={() => {
logout();
history.push(shared_routes.index);
}}
>
<div className='dc-vertical-tab__header-account__logout'>
<Icon icon='IcLogout' className='dc-vertical-tab__header-account__logout--icon' />
<Text size='xs' weight='bold'>
<Text color='general' size='xxs' weight='normal'>
{localize('Log out')}
</Text>
</div>
Expand All @@ -51,13 +30,11 @@ const TradingHubLogout = ({ logout }) => {
const PageOverlayWrapper = ({
is_from_derivgo,
is_appstore,
is_pre_appstore,
list_groups,
logout,
onClickClose,
selected_route,
subroutes,
history,
}) => {
if (isMobile() && selected_route) {
return (
Expand Down Expand Up @@ -97,7 +74,6 @@ const PageOverlayWrapper = ({
is_full_width
list={subroutes}
list_groups={list_groups}
extra_content={is_pre_appstore && <TradingHubLogout logout={logout} />}
/>
</PageOverlay>
);
Expand All @@ -119,7 +95,7 @@ const Account = ({
should_allow_authentication,
toggleAccount,
}) => {
const { is_appstore, is_pre_appstore } = React.useContext(PlatformContext);
const { is_appstore } = React.useContext(PlatformContext);
const subroutes = flatten(routes.map(i => i.subroutes));
let list_groups = [...routes];
list_groups = list_groups.map(route_group => ({
Expand Down Expand Up @@ -183,14 +159,12 @@ const Account = ({
<PageOverlayWrapper
is_from_derivgo={is_from_derivgo}
is_appstore={is_appstore}
is_pre_appstore={is_pre_appstore}
list_groups={list_groups}
logout={logout}
onClickClose={onClickClose}
platform={platform}
selected_route={selected_route}
subroutes={subroutes}
history={history}
/>
</div>
</FadeWrapper>
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/account/src/Sections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import ConnectedApps from 'Sections/Security/ConnectedApps';
import LoginHistory from 'Sections/Security/LoginHistory';
import AccountClosed from 'Sections/Security/AccountClosed';
import DeactivateAccount from 'Sections/Security/DeactivateAccount'; // TODO: Remove once mobile team has changed this link
import LanguageSettings from 'Sections/Profile/LanguageSettings';

export {
AccountLimits,
Expand All @@ -31,5 +30,4 @@ export {
LoginHistory,
AccountClosed,
DeactivateAccount,
LanguageSettings,
};
16 changes: 0 additions & 16 deletions packages/account/src/Styles/account.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,6 @@ $MIN_HEIGHT_FLOATING: calc(
padding-left: 4.4rem;
background-color: var(--general-main-1);
}
&__header {
&-account__logout {
margin-top: 1rem;
align-items: center;
justify-content: center;
display: flex;
border: 2px solid var(--border-normal-1);
padding: 1rem;
border-radius: 0.5rem;
cursor: pointer;

&--icon {
margin-right: 0.8rem;
}
}
}
}

.dc-vertical-tab--dashboard {
Expand Down
48 changes: 0 additions & 48 deletions packages/appstore/.storybook/main.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/appstore/.storybook/preview-body.html

This file was deleted.

1 change: 0 additions & 1 deletion packages/appstore/.storybook/preview.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/appstore/.storybook/scss-loader.scss

This file was deleted.

Loading

0 comments on commit e703c77

Please sign in to comment.