1
1
/* eslint-disable max-len */
2
2
import { FC } from 'react'
3
- import { toast } from 'react-toastify'
4
3
5
- import { MemberEmailPreferenceAPI , updateMemberEmailPreferencesAsync , useMemberEmailPreferences , UserProfile } from '~/libs/core'
6
4
import { Button } from '~/libs/ui'
7
5
import { EnvironmentConfig } from '~/config'
8
6
9
- import { ForumIcon , SettingSection , triggerSurvey } from '../../../lib'
7
+ import { ForumIcon , SettingSection } from '../../../lib'
10
8
11
- import { subscribeLink , unsubscribeLink } from './preferences.config'
12
9
import styles from './PreferencesTab.module.scss'
13
10
14
- interface PreferencesTabProps {
15
- profile : UserProfile
16
- }
17
-
18
- const PreferencesTab : FC < PreferencesTabProps > = ( props : PreferencesTabProps ) => {
19
- const { data : emailPreferences , mutate : mutateEmailPreferencesData } : MemberEmailPreferenceAPI
20
- = useMemberEmailPreferences ( props . profile . email )
21
-
11
+ const PreferencesTab : FC < any > = ( ) => {
22
12
function handleGoToForumPreferences ( ) : void {
23
- window . open ( `https://${ EnvironmentConfig . ENV === 'prod' ? 'discussions' : 'vanilla' } .${ EnvironmentConfig . TC_DOMAIN } /profile/preferences` , '_blank' )
13
+ window . open (
14
+ `https://${
15
+ EnvironmentConfig . ENV === 'prod' ? 'discussions' : 'vanilla'
16
+ } .${ EnvironmentConfig . TC_DOMAIN } /profile/preferences`,
17
+ '_blank' ,
18
+ )
24
19
}
25
20
26
21
return (
@@ -46,7 +41,6 @@ const PreferencesTab: FC<PreferencesTabProps> = (props: PreferencesTabProps) =>
46
41
/>
47
42
) }
48
43
/>
49
-
50
44
</ div >
51
45
</ div >
52
46
)
0 commit comments