4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Merge pull request #159 from Philreact/bugfix/chat-link-root

fix linking error when link to root q-app
This commit is contained in:
AlphaX-Projects 2023-05-06 15:06:52 +02:00 committed by GitHub
commit c62d2bb86e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,17 @@ function processText(input) {
const res = await extractComponents(part)
if (!res) return
const { service, name, identifier, path } = res
window.location = `../../qdn/browser/index.html?service=${service}&name=${name}&identifier=${identifier}&path=${path}`
let query = `?service=${service}`
if (name) {
query = query + `&name=${name}`
}
if (identifier) {
query = query + `&identifier=${identifier}`
}
if (path) {
query = query + `&path=${path}`
}
window.location = `../../qdn/browser/index.html${query}`
} catch (error) {
console.log({ error })
}