fix(frontend): ThoughtForm — safe onSuccess?.() on cancel, dedupe reply textarea classes
This commit is contained in:
@@ -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>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user