Skip to content

Commit d8429c1

Browse files
committed
refactor: useDevice
1 parent a7619d3 commit d8429c1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/components/FooterPageSection.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const props = defineProps({
1111
required: false,
1212
},
1313
})
14+
15+
const { isMobile } = useDevice()
1416
</script>
1517

1618
<template>
@@ -19,8 +21,7 @@ const props = defineProps({
1921
<VueFesLogo />
2022
</div>
2123
<div v-if="!hasAuth" class="footer-info">
22-
<!-- @vue-expect-error TODO: 何か @nuxtjs/module-device の型がうまく推論されていないので一端回避 -->
23-
<div v-if="!$device.isMobile" class="footer-info-links">
24+
<div v-if="!isMobile" class="footer-info-links">
2425
<div class="contacts">
2526
<ContactLinks />
2627
</div>
@@ -29,16 +30,14 @@ const props = defineProps({
2930
</div>
3031
<PrivacyPolicyAndCoc />
3132
</div>
32-
<!-- @vue-expect-error TODO: 何か @nuxtjs/module-device の型がうまく推論されていないので一端回避 -->
33-
<div v-if="!$device.isMobile" class="footer-copyright">
33+
<div v-if="!isMobile" class="footer-copyright">
3434
<CopyrightText />
3535
</div>
3636
</div>
3737
<div v-if="hasAuth" class="footer-info">
3838
<CopyrightText />
3939
</div>
40-
<!-- @vue-expect-error TODO: 何か @nuxtjs/module-device の型がうまく推論されていないので一端回避 -->
41-
<div v-if="!hasAuth && $device.isMobile" class="footer-copyright">
40+
<div v-if="!hasAuth && isMobile" class="footer-copyright">
4241
<CopyrightText />
4342
</div>
4443
</section>

app/components/TimetablePageSection.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import TimetableView from '~/components/timetable/TimetableView.vue'
44
import ScrollHint from 'scroll-hint'
55
import 'scroll-hint/css/scroll-hint.css'
66
7+
const { isMobile } = useDevice()
8+
79
onMounted(() => {
810
new ScrollHint('.timetable-wrapper', {
911
suggestiveShadow: true,
@@ -22,8 +24,7 @@ onMounted(() => {
2224
:title="'Time table'"
2325
:yamato-title="$t('top.timetable_subtitle')"
2426
/>
25-
<!-- @vue-expect-error TODO: 何か @nuxtjs/module-device の型がうまく推論されていないので一端回避 -->
26-
<div v-if="$device.isMobile" class="timetable-wrapper">
27+
<div v-if="isMobile" class="timetable-wrapper">
2728
<TimetableViewMobile />
2829
</div>
2930
<div v-else class="timetable-wrapper">

0 commit comments

Comments
 (0)