"use client"; import { useActionState } from "react"; import type { ActionResult } from "../actions"; import { SeededInput } from "../../components/forms/Field"; type Props = { slug: string; action: (prev: ActionResult, formData: FormData) => Promise; // Why the rename is refused right now, or null. The ACTION asks the same // question and refuses with the same sentence — this is the courtesy that // says so before the form is filled in, not the guard. busyReason?: string | null; }; export function RenameChannelForm({ slug, action, busyReason = null }: Props) { const [state, formAction] = useActionState( action, undefined, ); return (

Renaming moves transcripts/channels/{slug}/ (and its saved videos, site memberships and scheduled-sync state) to the new slug, and{" "} changes this channel's public URL — existing links to the old slug will break. Type the current slug to confirm.

{busyReason && (

{busyReason}

)}
{state?.error && (

{state.error}

)}
); }