Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
feat(user): hide log out button to guest
Browse files Browse the repository at this point in the history
Co-authored-by: Jarlem Red de Peralta <lmoa.jhdp@gmail.com>
  • Loading branch information
AteKitty07 and lemredd committed Oct 11, 2022
1 parent 10cabe4 commit 44540ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/page_shell/navigation_links.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</span>
<span class="link-name">{{ link.name }}</span>
</Anchor>
<LogOutBtn class="mobile-log-out"/>
<LogOutBtn v-if="isUserLoggedIn" class="mobile-log-out"/>
</div>
</template>
</Dropdown>
Expand Down Expand Up @@ -91,7 +91,7 @@ body.unscrollable {
<script setup lang="ts">
import { computed, inject, Ref } from "vue"
import type { DeserializedPageContext } from "$@/types/independent"
import type { PageContext } from "$/types/renderer"
import { BODY_CLASSES } from "$@/constants/provided_keys"
Expand All @@ -106,7 +106,9 @@ import Dropdown from "@/page_shell/dropdown.vue"
import LogOutBtn from "@/authentication/log_out_btn.vue"
const emit = defineEmits([ "toggle" ])
const pageContext = inject("pageContext") as DeserializedPageContext
const pageContext = inject("pageContext") as PageContext<"deserialized">
const { "pageProps": { userProfile } } = pageContext
const isUserLoggedIn = Boolean(userProfile)
// Role
const roleLinks = computed(() => filterLinkInfo(pageContext, linkInfos))
Expand Down

0 comments on commit 44540ca

Please sign in to comment.