Show the feedback widget if the user is logged in.
This commit is contained in:
parent
67e5d29a30
commit
b52a1f8ae2
1 changed files with 5 additions and 4 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue