Prevent client app links from functioning in the builder preview
This commit is contained in:
parent
a40bf95c41
commit
34509e0c12
|
@ -1,8 +1,8 @@
|
||||||
import * as API from "./api"
|
import * as API from "./api"
|
||||||
import { authStore, routeStore, screenStore, bindingStore } from "./store"
|
import { authStore, routeStore, screenStore, bindingStore } from "./store"
|
||||||
import { styleable } from "./utils/styleable"
|
import { styleable } from "./utils/styleable"
|
||||||
|
import { linkable } from "./utils/linkable"
|
||||||
import { getAppId } from "./utils/getAppId"
|
import { getAppId } from "./utils/getAppId"
|
||||||
import { link as linkable } from "svelte-spa-router"
|
|
||||||
import DataProvider from "./components/DataProvider.svelte"
|
import DataProvider from "./components/DataProvider.svelte"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { get } from "svelte/store"
|
||||||
|
import { link } from "svelte-spa-router"
|
||||||
|
import { builderStore } from "../store"
|
||||||
|
|
||||||
|
export const linkable = (node, href) => {
|
||||||
|
if (get(builderStore).inBuilder) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
link(node, href)
|
||||||
|
}
|
Loading…
Reference in New Issue