11"use client" ;
22
33import {
4+ ChevronDownIcon ,
5+ ChevronUpIcon ,
46 LogOutIcon ,
57 MenuIcon ,
68 MoonIcon ,
@@ -36,6 +38,8 @@ export function MobileBurgerMenuButton(
3638 } ,
3739) {
3840 const [ isMenuOpen , setIsMenuOpen ] = useState ( false ) ;
41+ const [ showFeedbackSection , setShowFeedbackSection ] = useState ( false ) ;
42+ const [ modalFeedback , setModalFeedback ] = useState ( "" ) ;
3943 const { setTheme, theme } = useTheme ( ) ;
4044 const ensQuery = useEns ( {
4145 addressOrEnsName :
@@ -44,6 +48,17 @@ export function MobileBurgerMenuButton(
4448 } ) ;
4549 // const [isCMDSearchModalOpen, setIsCMDSearchModalOpen] = useState(false);
4650
51+ const handleModalSubmit = ( ) => {
52+ console . log ( "Modal feedback sent:" , modalFeedback ) ;
53+ setModalFeedback ( "" ) ;
54+ setShowFeedbackSection ( false ) ;
55+ } ;
56+
57+ const handleModalCancel = ( ) => {
58+ setModalFeedback ( "" ) ;
59+ setShowFeedbackSection ( false ) ;
60+ } ;
61+
4762 useLayoutEffect ( ( ) => {
4863 if ( isMenuOpen ) {
4964 document . body . style . overflow = "hidden" ;
@@ -71,7 +86,7 @@ export function MobileBurgerMenuButton(
7186 </ Button >
7287
7388 { isMenuOpen && (
74- < div className = "fade-in-0 fixed inset-0 z-50 flex animate-in flex-col bg-background p-6 duration-200" >
89+ < div className = "fade-in-0 fixed inset-0 z-50 flex animate-in flex-col bg-background p-6 duration-200 overflow-y-auto " >
7590 < Button
7691 className = "!h-auto absolute top-4 right-4 p-1"
7792 onClick = { ( ) => setIsMenuOpen ( false ) }
@@ -191,14 +206,64 @@ export function MobileBurgerMenuButton(
191206 Docs
192207 </ Link >
193208
194- < Link
195- className = "text-muted-foreground hover:text-foreground"
196- href = "https://feedback.thirdweb.com"
197- rel = "noopener noreferrer"
198- target = "_blank"
199- >
200- Feedback
201- </ Link >
209+ < div className = "flex flex-col gap-3" >
210+ < button
211+ type = "button"
212+ className = "flex items-center justify-between text-muted-foreground hover:text-foreground"
213+ onClick = { ( ) => setShowFeedbackSection ( ! showFeedbackSection ) }
214+ >
215+ < span > Feedback</ span >
216+ { showFeedbackSection ? (
217+ < ChevronUpIcon className = "size-4" />
218+ ) : (
219+ < ChevronDownIcon className = "size-4" />
220+ ) }
221+ </ button >
222+
223+ { showFeedbackSection && (
224+ < div className = "bg-muted/50 rounded-lg p-4 space-y-4 mb-8" >
225+ < h3 className = "text-sm font-medium text-foreground" >
226+ Share your feedback with us:
227+ </ h3 >
228+
229+ < textarea
230+ value = { modalFeedback }
231+ onChange = { ( e ) => setModalFeedback ( e . target . value ) }
232+ className = "w-full bg-background text-foreground rounded-lg p-3 min-h-[100px] resize-none border border-border focus:border-border focus:outline-none placeholder-muted-foreground font-sans text-sm"
233+ placeholder = "Tell us what you think..."
234+ />
235+
236+ < div className = "flex flex-col gap-3" >
237+ < p className = "text-muted-foreground text-xs" >
238+ Have a technical issue?{ " " }
239+ < Link
240+ href = "/team/~/~/support"
241+ className = "underline hover:text-foreground transition-colors"
242+ >
243+ Contact support
244+ </ Link >
245+ .
246+ </ p >
247+ < div className = "flex gap-3" >
248+ < button
249+ type = "button"
250+ onClick = { handleModalCancel }
251+ className = "flex-1 bg-transparent text-foreground px-3 py-2 rounded-lg font-sans text-sm border border-border hover:bg-muted transition-colors"
252+ >
253+ Cancel
254+ </ button >
255+ < button
256+ type = "button"
257+ onClick = { handleModalSubmit }
258+ className = "flex-1 bg-primary text-primary-foreground px-3 py-2 rounded-lg font-sans text-sm hover:bg-primary/90 transition-colors"
259+ >
260+ Submit
261+ </ button >
262+ </ div >
263+ </ div >
264+ </ div >
265+ ) }
266+ </ div >
202267 </ div >
203268
204269 < div className = "h-6" />
0 commit comments