Skip to content

Commit

Permalink
feat: added guided tour steps
Browse files Browse the repository at this point in the history
  • Loading branch information
aizad-deriv committed Jun 30, 2023
1 parent d20a31c commit 6e2dac4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ const WalletHeaderButtons = observer(({ is_disabled, is_open, btns, wallet_accou
const { setIsWalletModalVisible } = ui;
const { setWalletModalActiveWalletID, setWalletModalActiveTab } = traders_hub;

const button_is_expanded = is_open ? 'wallet-button-expanded' : 'wallet-button-collapsed';
const handleOnClick = async (btn: TWalletButton) => {
setWalletModalActiveTab(btn.name);
setIsWalletModalVisible(true);
setWalletModalActiveWalletID(wallet_account.loginid);
};

return (
<div className='wallet-header__description-buttons'>
<div className='wallet-header__description-buttons' id={button_is_expanded}>
{btns.map(btn => (
<div
key={btn.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const WalletHeader = observer(({ wallet_account }: TWalletHeader) => {
const { multipliers_account_status } = traders_hub;

const wallet_btns = getWalletHeaderButtons(wallet_account.is_demo);
const wallet_status = wallet_account.is_selected ? 'wallet-is-selected' : 'wallet-is-not-selected';

const onArrowClickHandler = async () => {
// setIsLoading(true);
Expand All @@ -37,7 +38,10 @@ const WalletHeader = observer(({ wallet_account }: TWalletHeader) => {
// }, [is_authorize]);

return (
<div className={classNames('wallet-header', { 'wallet-header__demo': wallet_account.is_demo })}>
<div
className={classNames('wallet-header', { 'wallet-header__demo': wallet_account.is_demo })}
id={wallet_status}
>
<div className='wallet-header__container'>
<WalletCurrencyCard
is_demo={wallet_account.is_demo}
Expand Down
4 changes: 2 additions & 2 deletions packages/appstore/src/constants/wallets-tour-steps-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const getWalletStepConfig = (): Step[] => [
{localize('This is your Wallet. You can see your total balance for this Wallet here.')}
</Text>
),
target: '.wallet-header',
target: '#wallet-is-not-selected',
disableBeacon: true,
disableOverlayClose: true,
placement: 'bottom-end',
Expand Down Expand Up @@ -60,7 +60,7 @@ export const getWalletStepConfig = (): Step[] => [
)}
</Text>
),
target: '.wallet-header__description-buttons',
target: '#wallet-button-expanded',
disableBeacon: true,
disableOverlayClose: true,
},
Expand Down
1 change: 1 addition & 0 deletions packages/stores/src/mockStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ const mock = (): TStores & { is_mock: boolean } => {
setShouldShowCooldownModal: jest.fn(),
},
traders_hub: {
CFDs_restricted_countries: false,
closeModal: jest.fn(),
combined_cfd_mt5_accounts: [],
content_flag: '',
Expand Down

0 comments on commit 6e2dac4

Please sign in to comment.