mirror of
https://github.com/langgenius/dify.git
synced 2026-03-31 01:46:51 +08:00
example regexp exec (#25200)
This commit is contained in:
parent
f721c778ad
commit
19e1cbd033
@ -27,7 +27,7 @@ const I18N_PREFIX = 'app.tracing'
|
||||
const Panel: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const pathname = usePathname()
|
||||
const matched = pathname.match(/\/app\/([^/]+)/)
|
||||
const matched = /\/app\/([^/]+)/.exec(pathname)
|
||||
const appId = (matched?.length && matched[1]) ? matched[1] : ''
|
||||
const { isCurrentWorkspaceEditor } = useAppContext()
|
||||
const readOnly = !isCurrentWorkspaceEditor
|
||||
|
||||
Loading…
Reference in New Issue
Block a user