File tree 1 file changed +15
-8
lines changed
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,11 @@ const ChatPage: React.FC = () => {
405
405
}
406
406
} ;
407
407
408
+ // Initialize forceExpandPromptList to null when the path changes
409
+ useEffect ( ( ) => {
410
+ setForceExpandPromptList ( null ) ;
411
+ } , [ pathname , setForceExpandPromptList ] ) ;
412
+
408
413
return (
409
414
< >
410
415
< div
@@ -443,14 +448,16 @@ const ChatPage: React.FC = () => {
443
448
} `}
444
449
/>
445
450
446
- < Button
447
- className = "text-sm"
448
- outlined
449
- onClick = { ( ) => {
450
- setForceExpandPromptList ( Math . random ( ) ) ;
451
- } } >
452
- { t ( 'chat.view_prompt_examples' ) }
453
- </ Button >
451
+ { ! loadingMessages && (
452
+ < Button
453
+ className = "text-sm"
454
+ outlined
455
+ onClick = { ( ) => {
456
+ setForceExpandPromptList ( Math . random ( ) ) ;
457
+ } } >
458
+ { t ( 'chat.view_prompt_examples' ) }
459
+ </ Button >
460
+ ) }
454
461
</ div >
455
462
) }
456
463
You can’t perform that action at this time.
0 commit comments