11<script setup lang="ts">
2- import { useFetch , useHead } from ' #imports'
3- import { useLocaleCurrent } from ' ~/composables/useLocaleCurrent'
2+ import { useFetch , useHead , usePathWithLocale } from ' #imports'
43import type { RelatedEventInfo } from ' @vuejs-jp/model'
54import { conferenceTitle , linkUrl , ogRelatedEventDescription } from ' ~/utils/constants'
65import { generalOg , twitterOg } from ' ~/utils/og.constants'
@@ -13,10 +12,15 @@ if (error.value) {
1312}
1413const { eventsInfo } = data .value as RelatedEvents
1514
16- const { path : localePath } = useLocaleCurrent ()
15+ const pathWithLocale = usePathWithLocale ()
1716
1817const 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+ )
2024
2125useHead ({
2226 titleTemplate : (titleChunk ) => ` 関連イベント | ${conferenceTitle } ` ,
@@ -46,7 +50,9 @@ useHead({
4650 :src =" event.bannerUrl"
4751 :alt =" event.title"
4852 :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+ "
5056 :disabled =" isClose(event.startedAt)"
5157 >
5258 <template #title >
@@ -64,7 +70,7 @@ useHead({
6470 background-color =" white"
6571 color =" vue-blue"
6672 target =" "
67- :href =" `${localePath}/` "
73+ :href =" pathWithLocale('/') "
6874 >
6975 {{ $t('back_to_top') }}
7076 </VFLinkButton >
@@ -89,7 +95,7 @@ useHead({
8995 }
9096
9197 &:before {
92- content : " " ;
98+ content : ' ' ;
9399 position : absolute ;
94100 display : block ;
95101 bottom : 0 ;
@@ -117,7 +123,7 @@ useHead({
117123
118124 @media (--tablet ) {
119125 padding : 20px 0 60px ;
120- max-width : 100%
126+ max-width : 100% ;
121127 }
122128
123129 li {
0 commit comments