Update createText function call to remove sortOrder parameter
This commit is contained in:
@@ -850,15 +850,14 @@ export default function App() {
|
|||||||
const filename = filePath.split(/[\/]/).pop() || DEFAULT_TITLE;
|
const filename = filePath.split(/[\/]/).pop() || DEFAULT_TITLE;
|
||||||
const title = filename.replace(/\.(txt|md)$/i, "") || DEFAULT_TITLE;
|
const title = filename.replace(/\.(txt|md)$/i, "") || DEFAULT_TITLE;
|
||||||
const contents = await readTextFile(filePath);
|
const contents = await readTextFile(filePath);
|
||||||
const sortOrder = getNextTextSortOrder(null);
|
const { textId } = await createText(title, contents, null);
|
||||||
const { textId } = await createText(title, contents, null, sortOrder);
|
|
||||||
await refreshTexts();
|
await refreshTexts();
|
||||||
setSelectedTextId(textId);
|
setSelectedTextId(textId);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to open text file", error);
|
console.error("Failed to open text file", error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[getNextTextSortOrder, refreshTexts]
|
[refreshTexts]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFilePaths = useCallback(
|
const handleFilePaths = useCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user