fix(frontend): ThoughtForm — safe onSuccess?.() on cancel, dedupe reply textarea classes

This commit is contained in:
2026-05-15 20:07:27 +02:00
parent d450a1d8d8
commit 71233f069e

View File

@@ -77,7 +77,7 @@ export function ThoughtForm({ replyToId, onSuccess, card = !replyToId }: Thought
<FormControl> <FormControl>
<Textarea <Textarea
placeholder={replyToId ? "Post your reply..." : "What's on your mind?"} placeholder={replyToId ? "Post your reply..." : "What's on your mind?"}
className={`resize-none ${replyToId ? "bg-white glass-effect glossy-effect bottom shadow-fa-sm" : ""}`} className={`resize-none ${replyToId ? "bg-white shadow-fa-sm" : ""}`}
{...field} {...field}
/> />
</FormControl> </FormControl>
@@ -116,7 +116,7 @@ export function ThoughtForm({ replyToId, onSuccess, card = !replyToId }: Thought
/> />
)} )}
{replyToId && ( {replyToId && (
<Button type="button" variant="ghost" onClick={onSuccess}> <Button type="button" variant="ghost" onClick={() => onSuccess?.()}>
Cancel Cancel
</Button> </Button>
)} )}