1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-24 21:39:36 +02:00

Changing bookmark category

This commit is contained in:
unknown 2021-06-05 15:48:43 +02:00
parent 96aa1f7d69
commit 08c769b630
5 changed files with 64 additions and 48 deletions

View file

@ -17,7 +17,7 @@ interface ComponentProps {
addCategory: (formData: NewCategory) => void;
addBookmark: (formData: NewBookmark) => void;
updateCategory: (id: number, formData: NewCategory) => void;
updateBookmark: (id: number, formData: NewBookmark, categoryWasChanged: boolean) => void;
updateBookmark: (id: number, formData: NewBookmark, previousCategoryId: number) => void;
createNotification: (notification: NewNotification) => void;
}
@ -90,7 +90,7 @@ const BookmarkForm = (props: ComponentProps): JSX.Element => {
setCategoryName({ name: '' });
} else if (props.contentType === ContentType.bookmark && props.bookmark) {
// Update bookmark
props.updateBookmark(props.bookmark.id, formData, props.bookmark.categoryId !== formData.categoryId);
props.updateBookmark(props.bookmark.id, formData, props.bookmark.categoryId);
setFormData({
name: '',
url: '',