fix(web): remove stray onSubmit on delete form
Server components can't pass function props (onSubmit handlers etc.) to client-rendered HTML elements. The handler here was a no-op leftover — removing it fixes the 500 'Event handlers cannot be passed to Client Component props' on /memories/[id]. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -126,11 +126,7 @@ export default async function MemoryDetailPage({
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{!isEditing ? (
|
{!isEditing ? (
|
||||||
<form
|
<form action={deleteMemoryAction} className="flex justify-end">
|
||||||
action={deleteMemoryAction}
|
|
||||||
onSubmit={() => undefined}
|
|
||||||
className="flex justify-end"
|
|
||||||
>
|
|
||||||
<input type="hidden" name="id" value={m.id} />
|
<input type="hidden" name="id" value={m.id} />
|
||||||
<Button type="submit" variant="danger" size="sm">
|
<Button type="submit" variant="danger" size="sm">
|
||||||
Delete memory
|
Delete memory
|
||||||
|
|||||||
Reference in New Issue
Block a user