1
- <script lang="ts">
2
- import { defineComponent } from " vue" ;
3
- import IconSlack from " ./icons/IconSlack.vue" ;
4
- import IconVue from " ./icons/IconVue.vue" ;
1
+ <script setup lang="ts">
5
2
import StyleMount from " ./StyleMount.vue" ;
6
3
import ButtonOutline from " ./ButtonOutline.vue" ;
7
4
import ChatStack from " ./ChatStack.vue" ;
8
-
9
- export default defineComponent ({
10
- components: {
11
- StyleMount ,
12
- ButtonOutline ,
13
- ChatStack
5
+ import { useNuxtApp } from " #app" ;
6
+
7
+ const { $i18n : { t } } = useNuxtApp ();
8
+
9
+ const chats = [
10
+ {
11
+ direction: " left" ,
12
+ avatar: " /img/home/avatar-001.jpg" ,
13
+ alt: " Avatar 001" ,
14
+ name: " Arisa Miyake" ,
15
+ time: " 3:12 PM" ,
16
+ body: t (" components.HomeCommunications.chats.user1" )
14
17
},
15
-
16
- data() {
17
- const $t = this .$t .bind (this );
18
- return {
19
- iconSlack: IconSlack ,
20
- iconVue: IconVue ,
21
-
22
- chats: [
23
- {
24
- direction: " left" ,
25
- avatar: " /img/home/avatar-001.jpg" ,
26
- alt: " Avatar 001" ,
27
- name: " Arisa Miyake" ,
28
- time: " 3:12 PM" ,
29
- body: $t (" components.HomeCommunications.chats.user1" )
30
- },
31
- {
32
- direction: " right" ,
33
- avatar: " /img/home/avatar-002.jpg" ,
34
- alt: " Avatar 002" ,
35
- name: " Kenji Yamadera" ,
36
- time: " 3:19 PM" ,
37
- body: $t (" components.HomeCommunications.chats.user2" )
38
- },
39
- {
40
- direction: " left" ,
41
- avatar: " /img/home/avatar-003.jpg" ,
42
- alt: " Avatar 003" ,
43
- name: " Ai Nakagawa" ,
44
- time: " 3:25 PM" ,
45
- body: $t (" components.HomeCommunications.chats.user3" )
46
- }
47
- ]
48
- };
18
+ {
19
+ direction: " right" ,
20
+ avatar: " /img/home/avatar-002.jpg" ,
21
+ alt: " Avatar 002" ,
22
+ name: " Kenji Yamadera" ,
23
+ time: " 3:19 PM" ,
24
+ body: t (" components.HomeCommunications.chats.user2" )
25
+ },
26
+ {
27
+ direction: " left" ,
28
+ avatar: " /img/home/avatar-003.jpg" ,
29
+ alt: " Avatar 003" ,
30
+ name: " Ai Nakagawa" ,
31
+ time: " 3:25 PM" ,
32
+ body: t (" components.HomeCommunications.chats.user3" )
49
33
}
50
- });
34
+ ] as const satisfies {
35
+ direction: " left" | " right" ;
36
+ avatar: string ;
37
+ alt: string ;
38
+ name: string ;
39
+ time: string ;
40
+ body: string ;
41
+ }[];
51
42
</script >
52
43
53
44
<template >
@@ -94,7 +85,7 @@ export default defineComponent({
94
85
tag =" a"
95
86
:block =" true"
96
87
href =" https://join.slack.com/t/vuejs-jp/shared_invite/zt-vmg3iysl-~CPGAxFMWwa0Fnu2IqtMdQ"
97
- : icon =" iconSlack "
88
+ icon =" /img/icons/slack.svg "
98
89
:label =" $t('components.HomeCommunications.slack')"
99
90
/>
100
91
</div >
@@ -104,7 +95,7 @@ export default defineComponent({
104
95
tag =" a"
105
96
:block =" true"
106
97
href =" https://forum.vuejs.org/c/japanese"
107
- : icon =" iconVue "
98
+ icon =" /img/icons/vue.svg "
108
99
:label =" $t('components.HomeCommunications.forum')"
109
100
/>
110
101
</div >
0 commit comments