@@ -2,13 +2,13 @@ import { Dispatch, FC, SetStateAction, useMemo, useState } from 'react'
2
2
import { useLocation } from 'react-router-dom'
3
3
import { KeyedMutator } from 'swr'
4
4
5
+ import { EnvironmentConfig } from '~/config'
5
6
import { useMemberTraits , UserProfile , UserTraits } from '~/libs/core'
6
7
import { PageTitle , TabsNavbar , TabsNavItem } from '~/libs/ui'
7
8
8
9
import { AccountSettingsTabsConfig , AccountSettingsTabViews , getHashFromTabId , getTabIdFromHash } from './config'
9
10
import { AccountTab } from './account'
10
11
import { PreferencesTab } from './preferences'
11
- import { PaymentsTab } from './payments'
12
12
import { ToolsTab } from './tools'
13
13
import { TCandYouTab } from './tcandyou'
14
14
import styles from './AccountSettingsTabs.module.scss'
@@ -31,9 +31,13 @@ const AccountSettingsTabs: FC<AccountSettingsTabsProps> = (props: AccountSetting
31
31
} = useMemberTraits ( props . profile . handle )
32
32
33
33
function handleTabChange ( tabId : string ) : void {
34
- setActiveTab ( tabId )
35
- window . location . hash = getHashFromTabId ( tabId )
36
- mutateTraits ( ) // mutate member traits to refresh the data
34
+ if ( tabId === AccountSettingsTabViews . payment ) {
35
+ window . location . href = `https://wallet.${ EnvironmentConfig . TC_DOMAIN } `
36
+ } else {
37
+ setActiveTab ( tabId )
38
+ window . location . hash = getHashFromTabId ( tabId )
39
+ mutateTraits ( ) // mutate member traits to refresh the data
40
+ }
37
41
}
38
42
39
43
return (
@@ -66,10 +70,6 @@ const AccountSettingsTabs: FC<AccountSettingsTabsProps> = (props: AccountSetting
66
70
{ activeTab === AccountSettingsTabViews . preferences && (
67
71
< PreferencesTab profile = { props . profile } />
68
72
) }
69
-
70
- { activeTab === AccountSettingsTabViews . payment && (
71
- < PaymentsTab profile = { props . profile } />
72
- ) }
73
73
</ div >
74
74
)
75
75
}
0 commit comments