mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-24 21:39:36 +02:00
Added option to reorder bookmarks
This commit is contained in:
parent
a02814aa02
commit
ec5f50aba4
5 changed files with 35 additions and 10 deletions
|
@ -69,12 +69,17 @@ export const Bookmarks = (props: Props): JSX.Element => {
|
|||
}, [isAuthenticated]);
|
||||
|
||||
useEffect(() => {
|
||||
if (categoryInEdit && !showTable) {
|
||||
if (categoryInEdit) {
|
||||
setTableContentType(ContentType.bookmark);
|
||||
setShowTable(true);
|
||||
}
|
||||
}, [categoryInEdit]);
|
||||
|
||||
useEffect(() => {
|
||||
setShowTable(false);
|
||||
setEditCategory(null);
|
||||
}, []);
|
||||
|
||||
// Form actions
|
||||
const toggleModal = (): void => {
|
||||
setModalIsOpen(!modalIsOpen);
|
||||
|
@ -108,6 +113,7 @@ export const Bookmarks = (props: Props): JSX.Element => {
|
|||
const showTableForEditing = (contentType: ContentType) => {
|
||||
// We're in the edit mode and the same button was clicked - go back to list
|
||||
if (showTable && contentType === tableContentType) {
|
||||
setEditCategory(null);
|
||||
setShowTable(false);
|
||||
} else {
|
||||
setShowTable(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue