Skip to content

Commit

Permalink
lintのエラー修正
Browse files Browse the repository at this point in the history
  • Loading branch information
shota973 committed Jun 15, 2024
1 parent 982a8bf commit 1febf68
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions src/pages/RoomList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import api,{ GetRoomsInner } from '@/lib/apis'
import api, { GetRoomsInner } from '@/lib/apis'
const rooms = ref<GetRoomsInner[]>([])
onMounted(async () => {
Expand All @@ -10,21 +10,34 @@ onMounted(async () => {
</script>

<template>
<div>
<div v-for="room in rooms" :key="room.roomId">
<div v-if="room.roomId && typeof(room.isPublic) == 'boolean'" class="roomListForms">
<!-- 下のpathは選択した部屋に入るページに飛ぶようにする -->
<button @click="() => {$router.push({ path: '/room/' + room.roomId + '/enter' })}"><div v-if="room.isPublic">フリールーム</div><div v-if="!room.isPublic">プライベートルーム</div>{{ room.roomName }}, {{ room.userCount }}人参加中</button>
</div>
<div>

Check failure on line 13 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
<div v-for="room in rooms" :key="room.roomId">

Check failure on line 14 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
<div

Check failure on line 15 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
class="roomListForms"

Check failure on line 16 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
v-if="room.roomId && typeof(room.isPublic) == 'boolean'"

Check failure on line 17 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Replace `······v-if="room.roomId·&&·typeof(room.isPublic)` with `········v-if="room.roomId·&&·typeof·room.isPublic`

Check warning on line 17 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Attribute "v-if" should go before "class"
>

Check failure on line 18 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
<!-- 下のpathは選択した部屋に入るページに飛ぶようにする -->

Check failure on line 19 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
<button

Check failure on line 20 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Replace `······` with `········`
@click="

Check failure on line 21 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
() => {

Check failure on line 22 in src/pages/RoomList.vue

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
$router.push({ path: '/room/' + room.roomId + '/enter' })
}
"
>
<div v-if="room.isPublic">フリールーム</div>
<div v-if="!room.isPublic">プライベートルーム</div>
{{ room.roomName }}, {{ room.userCount }}人参加中
</button>
</div>
</div>
</div>
</template>

<style scoped>
.read-the-docs {
color: #888;
}
.roomListForms {
margin: 10px
margin: 10px;
}
</style>

0 comments on commit 1febf68

Please sign in to comment.