Add ability for buttons to link to external URLs
This commit is contained in:
parent
b6a62de0d3
commit
7b876b2b42
|
@ -31,8 +31,14 @@ const triggerAutomationHandler = async action => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const navigationHandler = action => {
|
const navigationHandler = action => {
|
||||||
if (action.parameters.url) {
|
const { url } = action.parameters
|
||||||
routeStore.actions.navigate(action.parameters.url)
|
if (url) {
|
||||||
|
const external = !url.startsWith("/")
|
||||||
|
if (external) {
|
||||||
|
window.location.href = url
|
||||||
|
} else {
|
||||||
|
routeStore.actions.navigate(action.parameters.url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue