mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 07:00:49 +03:00
fix: getting docId, storeId parameters (#3761)
* fix: getting docId, storeId parameters * useparams to get path params --------- Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useState, useRef } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
import ReactJson from 'flowise-react-json-view'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
@@ -63,8 +63,7 @@ const VectorStoreQuery = () => {
|
||||
const enqueueSnackbar = (...args) => dispatch(enqueueSnackbarAction(...args))
|
||||
const closeSnackbar = (...args) => dispatch(closeSnackbarAction(...args))
|
||||
|
||||
const URLpath = document.location.pathname.toString().split('/')
|
||||
const storeId = URLpath[URLpath.length - 1] === 'document-stores' ? '' : URLpath[URLpath.length - 1]
|
||||
const { storeId } = useParams()
|
||||
|
||||
const [documentChunks, setDocumentChunks] = useState([])
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user