fix: deprecation warnings

This commit is contained in:
2022-08-17 08:42:25 +02:00
parent 2813ccc11f
commit d735a93a35
5 changed files with 24 additions and 25 deletions
+5 -5
View File
@@ -78,7 +78,7 @@
<script lang='ts'>
import { computed, defineComponent, ref, watch } from 'vue'
import { useRoute, useRouter, useStore } from '@nuxtjs/composition-api'
import { useNuxtApp, useRoute, useRouter } from '@nuxt/bridge/dist/runtime'
import List from './List/index.vue'
import { useAuth } from '~/plugins/auth'
@@ -102,14 +102,14 @@ export default defineComponent({
List
},
setup() {
const store = useStore()
const { $store } = useNuxtApp()
const { t } = useTranslation()
store.commit('setTitle', t('app.links.events'))
$store.commit('setTitle', t('app.links.events'))
const { loading: authLoading, isAuthenticated } = useAuth()
const route = useRoute()
const router = useRouter()
const range = computed({
get: () => route.value.query.range ? route.value.query.range as Range : undefined,
get: () => route.query.range ? route.query.range as Range : undefined,
set: (value) => {
router.push(`/?range=${value}`)
}
@@ -119,7 +119,7 @@ export default defineComponent({
const events = computed(() => result.value?.events ?? [])
const origins = computed(() => result.value?.origins ?? [])
watch(
() => route.value.query.range,
() => route.query.range,
(r) => {
if (!authLoading.value) {
variables.value = {
+3 -3
View File
@@ -60,7 +60,7 @@
<script lang='ts'>
import { computed, defineComponent, ref } from 'vue'
import { useStore } from '@nuxtjs/composition-api'
import { useNuxtApp } from '@nuxt/bridge/dist/runtime'
import { useAuth } from '~/plugins/auth'
import { useTranslation } from '~/plugins/i18n'
import {
@@ -73,9 +73,9 @@ import {
export default defineComponent({
name: 'OriginsPage',
setup() {
const store = useStore()
const { $store } = useNuxtApp()
const { t } = useTranslation()
store.commit('setTitle', t('app.links.origins'))
$store.commit('setTitle', t('app.links.origins'))
const { isAuthenticated } = useAuth()
const { result, loading, refetch } = useFindOriginsQuery()
const origins = computed(() => result.value?.origins ?? [])