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:
parent
96aa1f7d69
commit
08c769b630
5 changed files with 64 additions and 48 deletions
|
@ -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: '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue