Skip to content

Commit a0c30e5

Browse files
committed
fix hydration issue in podcast config modal
1 parent 476fe17 commit a0c30e5

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

surfsense_web/components/chat/ChatPanel/ChatPanelView.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,16 @@ export function ChatPanelView(props: ChatPanelViewProps) {
6464
</div>
6565
)}
6666

67-
{/* Generate/Regenerate button */}
68-
<button
69-
type="button"
67+
<div
68+
role="button"
69+
tabIndex={0}
7070
onClick={handleGeneratePost}
71+
onKeyDown={(e) => {
72+
if (e.key === "Enter" || e.key === " ") {
73+
e.preventDefault();
74+
handleGeneratePost();
75+
}
76+
}}
7177
className={cn(
7278
"w-full space-y-3 rounded-xl p-3 transition-colors",
7379
podcastIsStale
@@ -86,7 +92,7 @@ export function ChatPanelView(props: ChatPanelViewProps) {
8692
<p className="text-sm font-medium text-left">
8793
{podcastIsStale ? "Regenerate Podcast" : "Generate Podcast"}
8894
</p>
89-
</button>
95+
</div>
9096
</div>
9197
) : (
9298
<button

0 commit comments

Comments
 (0)