Fix js warnings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c660210439
commit
b264a49c23
@ -28,7 +28,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
<router-link
|
<router-link
|
||||||
class="button is-light"
|
class="button is-light"
|
||||||
v-if="currentUser.id"
|
v-if="currentUser.id && loggedPerson"
|
||||||
:to="{ name: 'Profile', params: { name: loggedPerson.preferredUsername} }"
|
:to="{ name: 'Profile', params: { name: loggedPerson.preferredUsername} }"
|
||||||
>
|
>
|
||||||
<figure class="image is-24x24">
|
<figure class="image is-24x24">
|
||||||
@ -43,12 +43,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
||||||
import { AUTH_USER_ACTOR } from '@/constants';
|
import { AUTH_USER_ACTOR } from "@/constants";
|
||||||
import { SEARCH } from '@/graphql/search';
|
import { SEARCH } from "@/graphql/search";
|
||||||
import { CURRENT_USER_CLIENT } from '@/graphql/user';
|
import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
||||||
import { onLogout } from '@/vue-apollo';
|
import { onLogout } from "@/vue-apollo";
|
||||||
import { deleteUserData } from '@/utils/auth';
|
import { deleteUserData } from "@/utils/auth";
|
||||||
import { LOGGED_PERSON } from "@/graphql/actor";
|
import { LOGGED_PERSON } from "@/graphql/actor";
|
||||||
import { IPerson } from "../types/actor.model";
|
import { IPerson } from "../types/actor.model";
|
||||||
|
|
||||||
@ -58,12 +58,12 @@ import { IPerson } from "../types/actor.model";
|
|||||||
query: SEARCH,
|
query: SEARCH,
|
||||||
variables() {
|
variables() {
|
||||||
return {
|
return {
|
||||||
searchText: this.searchText,
|
searchText: this.searchText
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
skip() {
|
skip() {
|
||||||
return !this.searchText;
|
return !this.searchText;
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
currentUser: {
|
currentUser: {
|
||||||
query: CURRENT_USER_CLIENT
|
query: CURRENT_USER_CLIENT
|
||||||
@ -71,7 +71,7 @@ import { IPerson } from "../types/actor.model";
|
|||||||
loggedPerson: {
|
loggedPerson: {
|
||||||
query: LOGGED_PERSON
|
query: LOGGED_PERSON
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
export default class NavBar extends Vue {
|
export default class NavBar extends Vue {
|
||||||
notifications = [
|
notifications = [
|
||||||
@ -128,12 +128,11 @@ export default class NavBar extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
alert('logout !');
|
alert("logout !");
|
||||||
|
|
||||||
deleteUserData();
|
deleteUserData();
|
||||||
|
|
||||||
return onLogout(this.$apollo);
|
return onLogout(this.$apollo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<section class="hero is-link" v-if="!currentUser.id">
|
<section class="hero is-link" v-if="!currentUser.id || !loggedPerson">
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="title">Find events you like</h1>
|
<h1 class="title">Find events you like</h1>
|
||||||
@ -43,7 +43,7 @@ import { FETCH_EVENTS } from "@/graphql/event";
|
|||||||
import { Component, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
import EventCard from "@/components/Event/EventCard.vue";
|
import EventCard from "@/components/Event/EventCard.vue";
|
||||||
import { LOGGED_PERSON } from "@/graphql/actor";
|
import { LOGGED_PERSON } from "@/graphql/actor";
|
||||||
import { IPerson } from "../types/actor.model";
|
import { IPerson } from "@/types/actor.model";
|
||||||
import { ICurrentUser } from "@/types/current-user.model";
|
import { ICurrentUser } from "@/types/current-user.model";
|
||||||
import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user