test trpc

This commit is contained in:
2023-05-02 19:42:40 +02:00
parent a598c1fe94
commit c05d1a9e6e
3 changed files with 24 additions and 3 deletions

View File

@@ -1,9 +1,12 @@
<script setup lang="ts">
import { useThemeStore } from '~/store/theme'
import { ColorsTheme } from '~~/types'
const { getColor, getTheme, nextColor, nextTheme } = useThemeStore()
const { getThemeTextColor, getThemeBackgroundColor } = useTheme()
const { query } = useRoute()
const { $trpc } = useNuxtApp()
const user = await $trpc.hello.query({ name: query.name?.toString() })
</script>
<template>
@@ -29,5 +32,8 @@ const { getThemeTextColor, getThemeBackgroundColor } = useTheme()
<div @click="nextTheme()">
setNextTheme()
</div>
<div>
{{ user.greeting }}
</div>
</section>
</template>