Remove unused functions getNextTextSortOrder and getNextFolderSortOrder in src/App.tsx
This commit is contained in:
22
src/App.tsx
22
src/App.tsx
@@ -386,28 +386,6 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getNextTextSortOrder = useCallback(
|
|
||||||
(folderId: string | null) => {
|
|
||||||
if (hasSearch) return null;
|
|
||||||
const list = textsByFolder.get(folderId ?? null) ?? [];
|
|
||||||
const hasManualOrder = list.some((text) => text.sort_order !== null);
|
|
||||||
if (!hasManualOrder) return null;
|
|
||||||
return list.length;
|
|
||||||
},
|
|
||||||
[hasSearch, textsByFolder]
|
|
||||||
);
|
|
||||||
|
|
||||||
const getNextFolderSortOrder = useCallback(
|
|
||||||
(parentId: string | null) => {
|
|
||||||
if (hasSearch) return null;
|
|
||||||
const list = foldersByParent.get(parentId ?? null) ?? [];
|
|
||||||
const hasManualOrder = list.some((folder) => folder.sort_order !== null);
|
|
||||||
if (!hasManualOrder) return null;
|
|
||||||
return list.length;
|
|
||||||
},
|
|
||||||
[foldersByParent, hasSearch]
|
|
||||||
);
|
|
||||||
|
|
||||||
const isFolderExpanded = useCallback(
|
const isFolderExpanded = useCallback(
|
||||||
(folderId: string) => {
|
(folderId: string) => {
|
||||||
if (hasSearch) {
|
if (hasSearch) {
|
||||||
|
|||||||
Reference in New Issue
Block a user