Hide "Team Collections" tab if user has no access

This commit is contained in:
Andrew Bastin
2021-05-13 20:16:41 -04:00
parent f55a995c0a
commit b9c3219094

View File

@@ -2,7 +2,11 @@
<div v-if="show">
<SmartTabs styles="m-4" :id="'collections_tab'" v-on:tab-changed="updateCollectionsType">
<SmartTab :id="'my-collections'" :label="'My Collections'" :selected="true"> </SmartTab>
<SmartTab :id="'team-collections'" :label="'Team Collections'">
<SmartTab
:id="'team-collections'"
:label="'Team Collections'"
v-if="currentUser && currentUser.eaInvited"
>
<ul>
<li>
<span class="select-wrapper">
@@ -32,11 +36,17 @@
<script>
import gql from "graphql-tag"
import { currentUserInfo$ } from "~/helpers/teams/BackendUserInfo"
export default {
props: {
show: Boolean,
},
subscriptions() {
return {
currentUser: currentUserInfo$,
}
},
apollo: {
myTeams: {
query: gql`