Typing
This commit is contained in:
@@ -27,7 +27,7 @@ function DebouncedGroupSettingsItem({
|
||||
bookmarks,
|
||||
searchTerm,
|
||||
}: { bookmarkGroup: BookmarkGroup; bookmarks: Bookmark[]; searchTerm: string }) {
|
||||
const { theme, isMobile, handleDelete } = useCommonHooks();
|
||||
const { theme, isMobile, handleDelete, reorder } = useCommonHooks();
|
||||
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(false);
|
||||
const [popoverOpened, setPopoverOpened] = useState(false);
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
@@ -44,12 +44,6 @@ function DebouncedGroupSettingsItem({
|
||||
const [bookmarkList, setBookmarkList] = useState<Bookmark[]>(bookmarks);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
const reorder = (list: any, startIndex: any, endIndex: any) => {
|
||||
const result = Array.from(list);
|
||||
const [removed]: any = result.splice(startIndex, 1);
|
||||
result.splice(endIndex, 0, removed);
|
||||
return result;
|
||||
};
|
||||
function onDragEnd(result: any) {
|
||||
if (!result.destination) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user