Typing
This commit is contained in:
@@ -28,19 +28,12 @@ const BookmarkSettings = () => {
|
||||
const [groups, setGroups] = useState<BookmarkGroup[]>([]);
|
||||
const [newGroup, setNewGroup] = useState<BookmarkGroup>(defaultGroup);
|
||||
const [groupList, setGroupList] = useState<BookmarkGroup[]>([]);
|
||||
const { theme, isMobile } = useCommonHooks();
|
||||
const { theme, isMobile, reorder } = useCommonHooks();
|
||||
const { mutateAsync } = useMutationAPI();
|
||||
const [searchValue, setSearchValue] = useState('');
|
||||
const [debouncedGroupSearch] = useDebouncedValue(searchValue, 500);
|
||||
const [modalOpened, { open: openModal, close: closeModal }] = useDisclosure(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;
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setNewGroup(defaultGroup);
|
||||
closeModal();
|
||||
|
||||
Reference in New Issue
Block a user