feat: implement file existence check and improve file upload handling
This commit is contained in:
@@ -80,7 +80,10 @@ export const CreateArticleForm = () => {
|
||||
});
|
||||
|
||||
const title = useWatch({ control: form.control, name: 'title' });
|
||||
const coverImageUrl = useWatch({ control: form.control, name: 'coverImageUrl' });
|
||||
const coverImageUrl = useWatch({
|
||||
control: form.control,
|
||||
name: 'coverImageUrl',
|
||||
});
|
||||
useEffect(() => {
|
||||
if (!title) return;
|
||||
form.setValue('slug', slugify(title).toLowerCase());
|
||||
|
||||
Reference in New Issue
Block a user