11/* eslint-disable max-len */
22import { FC } from 'react'
3- import { toast } from 'react-toastify'
43
5- import { MemberEmailPreferenceAPI , updateMemberEmailPreferencesAsync , useMemberEmailPreferences , UserProfile } from '~/libs/core'
64import { Button } from '~/libs/ui'
75import { EnvironmentConfig } from '~/config'
86
9- import { ForumIcon , SettingSection , triggerSurvey } from '../../../lib'
7+ import { ForumIcon , SettingSection } from '../../../lib'
108
11- import { subscribeLink , unsubscribeLink } from './preferences.config'
129import styles from './PreferencesTab.module.scss'
1310
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 > = ( ) => {
2212 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+ )
2419 }
2520
2621 return (
@@ -46,7 +41,6 @@ const PreferencesTab: FC<PreferencesTabProps> = (props: PreferencesTabProps) =>
4641 />
4742 ) }
4843 />
49-
5044 </ div >
5145 </ div >
5246 )
0 commit comments