Skip to content

Commit

Permalink
use button as router-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Juraci committed Jul 11, 2024
1 parent 20866ad commit d30164b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
21 changes: 11 additions & 10 deletions src/components/ChildNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ const handleDeleteNode = () => {
aria-label="edit"
@click="editing = true"
/>
<router-link :key="node.uuid" :to="`/nodes/${node.uuid}`">
<Button
data-test-child-node-show
icon="pi pi-search-plus"
text
raised
rounded
aria-label="show node"
/>
</router-link>
<Button
:key="node.uuid"
data-test-child-node-show
icon="pi pi-search-plus"
as="router-link"
:to="`/nodes/${node.uuid}`"
text
raised
rounded
aria-label="show node"
/>
<Button
data-test-child-node-add-child-node
icon="pi pi-plus"
Expand Down
21 changes: 11 additions & 10 deletions src/views/NodeShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,17 @@ const handleAddChildNode = () => {
rounded
@click="handleAddChildNode"
/>
<router-link v-if="node.parentNode" :to="rootNodeAddress">
<Button
data-test-node-go-back-to-root
label="Back to root node"
icon="pi pi-arrow-left"
severity="secondary"
aria-label="Back to root node"
rounded
/>
</router-link>
<Button
v-if="node.parentNode"
data-test-node-go-back-to-root
label="Back to root node"
icon="pi pi-arrow-left"
as="router-link"
:to="rootNodeAddress"
severity="secondary"
aria-label="Back to root node"
rounded
/>
</div>
<ChildNode
v-for="childNodeUuid in node.childNodes"
Expand Down

0 comments on commit d30164b

Please sign in to comment.