Show the feedback widget if the user is logged in.

This commit is contained in:
corsacca 2026-05-07 13:40:10 +01:00
parent 67e5d29a30
commit b52a1f8ae2

View file

@ -1,18 +1,19 @@
<template>
<div class="feedback-widget-slot">
<feedback-web-component :profile-config="profileConfig" />
<feedback-web-component :key="String(isLoggedIn)" :profile-config="profileConfig" />
</div>
</template>
<script setup lang="ts">
const { public: pub } = useRuntimeConfig()
const { isLoggedIn } = useAuth()
const profileConfig = JSON.stringify({
const profileConfig = computed(() => JSON.stringify({
profile: 'chat-bubble',
apiBase: pub.feedbackApiBase,
enabled: true,
showByDefault: false,
showByDefault: isLoggedIn.value,
instanceId: 'fb-doxa-life-parent',
projectId: pub.feedbackProjectId
})
}))
</script>