Verified Commit 9d10e83f authored by Jakob Moser's avatar Jakob Moser
Browse files

Use m.route.Link instead of a for internal links

Closes #6
parent 3c587d71
Loading
Loading
Loading
Loading
Loading
+3 −1
Changes for portal/static/js/components/pieces/BoxedButton.mjs: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
export const BoxedButton = {
    view(vnode) {
        const type = vnode.attrs.href.startsWith("/") ? m.route.Link : "a"
        return [
            m(
                "a.box.btn",
                type,
                {
                    href: vnode.attrs.href,
                    target: vnode.attrs.sameTab ? "" : "_blank",
                    class: "box btn",
                },
                [
                    m("i", {