Renders the slug of a dump or a playlist, the last segment of its page's path, in their edit forms. A slug changes only from here: a new title proposes one, which saving applies, and the old one stays an alias of the item on the server.

Functions

f
SlugField<T extends FieldValues>(unnamed 0: SlugFieldProps<T>): React.JSX.Element

Renders the slug's input after its path, and its error. Until the user types in it, it follows the title, proposing slugify(title), or the saved slug when the title slugifies as the saved one does. It must sit under a react-hook-form FormProvider.

Interfaces

I
SlugFieldProps

Passed to SlugField by DumpEdit's and PlaylistEditForm's forms, which send the slug only when it differs from saved.slug.