1
1
import { ExternalLinkIcon , ExclamationIcon } from "@heroicons/react/solid" ;
2
2
import { useState } from "react" ;
3
+ import { HelpScout , useChat } from "react-live-chat-loader" ;
3
4
4
5
import { useLocale } from "@calcom/lib/hooks/useLocale" ;
5
6
import showToast from "@calcom/lib/notification" ;
@@ -18,6 +19,8 @@ export default function HelpMenuItem({ closeHelp }: HelpMenuItemProps) {
18
19
const [ rating , setRating ] = useState < null | string > ( null ) ;
19
20
const [ comment , setComment ] = useState ( "" ) ;
20
21
const [ disableSubmit , setDisableSubmit ] = useState ( true ) ;
22
+ const [ active , setActive ] = useState ( false ) ;
23
+ const [ , loadChat ] = useChat ( ) ;
21
24
const { t } = useLocale ( ) ;
22
25
23
26
const mutation = trpc . useMutation ( "viewer.submitFeedback" , {
@@ -190,6 +193,25 @@ export default function HelpMenuItem({ closeHelp }: HelpMenuItemProps) {
190
193
</ div >
191
194
) }
192
195
</ div >
196
+ < div className = "w-full bg-neutral-50 p-5" >
197
+ < p className = "text-neutral-500" > { t ( "specific_issue" ) } ? </ p >
198
+ < span
199
+ className = "font-medium text-neutral-500 underline hover:text-neutral-700"
200
+ onClick = { ( ) => {
201
+ setActive ( true ) ;
202
+ loadChat ( { open : true } ) ;
203
+ } } >
204
+ { t ( "contact_support" ) }
205
+ </ span >
206
+ < span className = "text-neutral-500" > { t ( "or" ) . toLowerCase ( ) } </ span >
207
+ < a
208
+ className = "font-medium text-neutral-500 underline hover:text-neutral-700"
209
+ href = "https://docs.cal.com/"
210
+ target = "_blank"
211
+ rel = "noreferrer" >
212
+ { t ( "browse_our_docs" ) } .
213
+ </ a >
214
+ </ div >
193
215
</ div >
194
216
) ;
195
217
}
0 commit comments