From d85428ddf8e3567ee3d21ab4d960289cb2b02e04 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Mon, 19 May 2025 20:02:49 +0000 Subject: [PATCH] fix bottom links reactivity --- frontend/components/Layout/DefaultLayout.vue | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/frontend/components/Layout/DefaultLayout.vue b/frontend/components/Layout/DefaultLayout.vue index 6a86ee7ec..b38d248be 100644 --- a/frontend/components/Layout/DefaultLayout.vue +++ b/frontend/components/Layout/DefaultLayout.vue @@ -16,7 +16,7 @@ absolute :top-link="topLinks" :secondary-links="cookbookLinks || []" - :bottom-links="isAdmin ? bottomLinks : []" + :bottom-links="bottomLinks" > (() => [ - { - icon: $globals.icons.cog, - title: i18n.t("general.settings"), - to: "/admin/site-settings", - restricted: true, - }, - ]); + const bottomLinks = computed(() => + isAdmin.value + ? [ + { + icon: $globals.icons.cog, + title: i18n.t("general.settings"), + to: "/admin/site-settings", + restricted: true, + }, + ] + : [] + ); const topLinks = computed(() => [ { @@ -307,7 +311,6 @@ export default defineNuxtComponent({ createLinks, bottomLinks, topLinks, - isAdmin, isOwnGroup, languageDialog, toggleDark,