1
1
<script setup lang="ts">
2
- import { useFetch , useHead } from ' #imports'
3
- import { useLocaleCurrent } from ' ~/composables/useLocaleCurrent'
2
+ import { useFetch , useHead , usePathWithLocale } from ' #imports'
4
3
import type { RelatedEventInfo } from ' @vuejs-jp/model'
5
4
import { conferenceTitle , linkUrl , ogRelatedEventDescription } from ' ~/utils/constants'
6
5
import { generalOg , twitterOg } from ' ~/utils/og.constants'
@@ -13,10 +12,15 @@ if (error.value) {
13
12
}
14
13
const { eventsInfo } = data .value as RelatedEvents
15
14
16
- const { path : localePath } = useLocaleCurrent ()
15
+ const pathWithLocale = usePathWithLocale ()
17
16
18
17
const isClose = (startedAt : string ) =>
19
- new Date () > new Date (new Date (startedAt ).getFullYear (), new Date (startedAt ).getMonth (), new Date (startedAt ).getDate ())
18
+ new Date () >
19
+ new Date (
20
+ new Date (startedAt ).getFullYear (),
21
+ new Date (startedAt ).getMonth (),
22
+ new Date (startedAt ).getDate (),
23
+ )
20
24
21
25
useHead ({
22
26
titleTemplate : (titleChunk ) => ` 関連イベント | ${conferenceTitle } ` ,
@@ -46,7 +50,9 @@ useHead({
46
50
:src =" event.bannerUrl"
47
51
:alt =" event.title"
48
52
:register-url =" event.registerUrl"
49
- :register-action-text =" isClose(event.startedAt) ? $t('related_events.close') : $t('related_events.register')"
53
+ :register-action-text ="
54
+ isClose(event.startedAt) ? $t('related_events.close') : $t('related_events.register')
55
+ "
50
56
:disabled =" isClose(event.startedAt)"
51
57
>
52
58
<template #title >
@@ -64,7 +70,7 @@ useHead({
64
70
background-color =" white"
65
71
color =" vue-blue"
66
72
target =" "
67
- :href =" `${localePath}/` "
73
+ :href =" pathWithLocale('/') "
68
74
>
69
75
{{ $t('back_to_top') }}
70
76
</VFLinkButton >
@@ -89,7 +95,7 @@ useHead({
89
95
}
90
96
91
97
&:before {
92
- content : " " ;
98
+ content : ' ' ;
93
99
position : absolute ;
94
100
display : block ;
95
101
bottom : 0 ;
@@ -117,7 +123,7 @@ useHead({
117
123
118
124
@media (--tablet ) {
119
125
padding : 20px 0 60px ;
120
- max-width : 100%
126
+ max-width : 100% ;
121
127
}
122
128
123
129
li {
0 commit comments