48 lines
971 B
Vue
48 lines
971 B
Vue
<script setup lang="ts">
|
|
import { useUserStore } from '~/stores/user'
|
|
|
|
const route = useRoute()
|
|
const user = useUserStore()
|
|
const name = route.params.id
|
|
|
|
watchEffect(() => {
|
|
user.setNewName(route.params.id as string)
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div i-twemoji:waving-hand text-4xl inline-block animate-shake-x animate-duration-5000 />
|
|
<h3 text-2xl font-500>
|
|
Hi,
|
|
</h3>
|
|
<div text-xl>
|
|
{{ name }}!
|
|
</div>
|
|
|
|
<template v-if="user.otherNames.length">
|
|
<p text-sm my-4>
|
|
<span op-50>Also as known as:</span>
|
|
<ul>
|
|
<li v-for="otherName in user.otherNames" :key="otherName">
|
|
<router-link :to="`/hi/${otherName}`" replace>
|
|
{{ otherName }}
|
|
</router-link>
|
|
</li>
|
|
</ul>
|
|
</p>
|
|
</template>
|
|
|
|
<Counter />
|
|
|
|
<div>
|
|
<NuxtLink
|
|
class="btn m-3 text-sm"
|
|
to="/"
|
|
>
|
|
Back
|
|
</NuxtLink>
|
|
</div>
|
|
</div>
|
|
</template>
|