refacto: migrate to composition API everywhere

This commit is contained in:
Julien Calixte
2026-01-22 23:00:45 +01:00
parent 08e9c41c4d
commit 33fd0a0a74
8 changed files with 56 additions and 129 deletions

View File

@@ -1,3 +1,14 @@
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const { push } = useRouter()
const back = () =>
push({
name: 'Home'
})
</script>
<template>
<button class="button is-white go-back" @click="back">
<svg
@@ -20,25 +31,6 @@
</button>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import { useRouter } from 'vue-router'
export default defineComponent({
name: 'GoBack',
setup() {
const { push } = useRouter()
return {
back: () =>
push({
name: 'Home'
})
}
}
})
</script>
<style lang="scss" scoped>
.go-back {
margin: 10px 0;