make index page dynamic

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2022-12-19 23:23:12 +06:00
parent 16be1385b6
commit 4ef9100efc
10 changed files with 197 additions and 32 deletions

View File

@@ -1,5 +1,20 @@
<script setup lang="ts">
const props = defineProps({
title: String,
});
const router = useRouter();
const onClick = () => {
router.push(`/tags/${props.title}`);
};
</script>
<template>
<div>
<topic-btn v-for="n in 7" :key="n" />
</div>
<button
@click="onClick"
class="bg-[#a2d9ff] px-2 py-1 m-2 transition hover:scale-105 rounded-md"
>
{{ title }}
</button>
</template>