<template>
    <main class="create-category layout-block">
        <category-row :index="1" editable @edited="onCategoryEdited" />
    </main>
</template>

<script setup>
import CategoryRow from '@/components/CategoryRow.vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const onCategoryEdited = (name) => {
    router.push({ name: 'category', params: { id: name } })
}
</script>
