SSE on words

This commit is contained in:
2024-12-29 22:06:57 +01:00
parent 29ffc556ec
commit e0ece631d3
8 changed files with 126 additions and 65 deletions
+16 -17
View File
@@ -1,35 +1,34 @@
<script setup lang="ts">
import { fetchUser } from '~/service/user.service';
import { useUserStore } from '~/store/user.store';
import { useUserStore } from "~/store/user.store";
export interface Props {
id: string;
id: string;
}
const userStore = useUserStore();
const props = defineProps<Props>()
const user = await userStore.fetchUser(props.id)
const props = defineProps<Props>();
const user = await userStore.fetchUser(props.id);
</script>
<template>
<div class="user">
<img class="user-avatar" :src="`https://cdn.discordapp.com/avatars/${user?.id}/${user?.avatar}.webp?size=32`">
{{ user?.username }}
</div>
<div class="user">
<img
class="user-avatar"
:src="`https://cdn.discordapp.com/avatars/${user?.id}/${user?.avatar}.webp?size=32`"
/>
{{ user?.username }}
</div>
</template>
<style lang="css">
div.user {
display: flex;
align-items: center;
display: flex;
align-items: center;
}
img.user-avatar {
height: 32px;
border-radius: 50%;
height: 32px;
border-radius: 50%;
}
</style>
</style>