improve: add production stage
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
// src/components/PathManager.js
|
||||
|
||||
import React, { useEffect, useState, useRef } from "react";
|
||||
import React, {useEffect, useState, useRef, useContext} from "react";
|
||||
import { useCreatePath, usePaths } from "../utils/path-queries";
|
||||
import { useQueryClient } from "react-query";
|
||||
import "./PathManager.css";
|
||||
import {fetch_} from "../utils/request-utils";
|
||||
import config from "../config";
|
||||
import {ConfigContext} from "../ConfigProvider";
|
||||
|
||||
const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
const [currentPath, setCurrentPath] = useState([{ name: "Root", id: 1 }]);
|
||||
@@ -17,6 +16,7 @@ const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
const queryClient = useQueryClient();
|
||||
const { data: subPaths, isLoading: isSubPathsLoading, error: subPathsError } = usePaths(currentPathId);
|
||||
const createPath = useCreatePath();
|
||||
const config = useContext(ConfigContext).config;
|
||||
|
||||
const buildPath = async (pathId) => {
|
||||
const path = [];
|
||||
|
||||
Reference in New Issue
Block a user