Convert linkable

This commit is contained in:
Adria Navarro 2025-01-10 12:46:20 +01:00
parent a566b49ec3
commit c38d694727
1 changed files with 2 additions and 2 deletions

View File

@ -1,8 +1,8 @@
import { get } from "svelte/store" import { get } from "svelte/store"
import { link } from "svelte-spa-router" import { link, LinkActionOpts } from "svelte-spa-router"
import { builderStore } from "stores" import { builderStore } from "stores"
export const linkable = (node, href) => { export const linkable = (node: HTMLElement, href?: LinkActionOpts) => {
if (get(builderStore).inBuilder) { if (get(builderStore).inBuilder) {
node.onclick = e => { node.onclick = e => {
e.preventDefault() e.preventDefault()