diff --git a/src/components/Navigations/PathNode.js b/src/components/Navigations/PathNode.js
index 651b8ea..90dd7f7 100644
--- a/src/components/Navigations/PathNode.js
+++ b/src/components/Navigations/PathNode.js
@@ -5,8 +5,10 @@ import "./PathNode.css";
import {useDeletePath, useMovePath, useUpdatePath} from "../../utils/path-queries";
import {useIndexMarkdown, useMoveMarkdown} from "../../utils/markdown-queries";
import MarkdownNode from "./MarkdownNode";
+import PathSettingModal from "../Modals/PathSettingModal";
const PathNode = ({ path, isRoot = false }) => {
+ const [isPathSettingModalOpen, setIsPathSettingModalOpen] = useState(false);
const [isExpanded, setIsExpanded] = useState(isRoot);
const [isEditing, setIsEditing] = useState(false);
const [newName, setNewName] = useState(path.name);
@@ -68,9 +70,6 @@ const PathNode = ({ path, isRoot = false }) => {
? markdowns.filter(md => md.title !== "index").sort((a, b) => a.order.localeCompare(b.order))
: [];
-/* if(childError || markdownError){
- return
Error...;
- }*/
if(isRoot)
return (
@@ -127,6 +126,21 @@ const PathNode = ({ path, isRoot = false }) => {
+
+
+
{isEditing ? (
+ setIsPathSettingModalOpen(false)}
+ />
diff --git a/src/components/Navigations/SideNavigation.js b/src/components/Navigations/SideNavigation.js
index 85f84c0..afc8010 100644
--- a/src/components/Navigations/SideNavigation.js
+++ b/src/components/Navigations/SideNavigation.js
@@ -9,9 +9,7 @@ const SideNavigation = () => {
const {data: tree, isLoading, error} = useTree();
const deletePath = useDeletePath();
const updatePath = useUpdatePath();
- const [searchTerm, setSearchTerm] = React.useState("");
const [keyword, setKeyword] = React.useState("");
- const [searchMode, setSearchMode] = React.useState(false);
const handleDelete = (id) => {
if (window.confirm("Are you sure you want to delete this path?")){
deletePath.mutate(id, {
diff --git a/src/utils/markdown-queries.js b/src/utils/markdown-queries.js
index a66feeb..bc9e2ea 100644
--- a/src/utils/markdown-queries.js
+++ b/src/utils/markdown-queries.js
@@ -108,4 +108,5 @@ export const useSearchMarkdown = (keyword) => {
export const useLinks = () => {
const config = useConfig();
return useQuery(["links"], () => fetch_(`${config.BACKEND_HOST}/api/markdown/links`));
-}
\ No newline at end of file
+}
+