Remove appconfig in favor of runtimeconfig
This commit is contained in:
4
client/plugins/amplitude.js
vendored
4
client/plugins/amplitude.js
vendored
@@ -1,6 +1,4 @@
|
||||
|
||||
const {logEvent} = useAmplitude()
|
||||
|
||||
// Hook function used by event listener
|
||||
function hookLogEvent (binding) {
|
||||
const modifiers = Object.keys(binding.modifiers)
|
||||
@@ -9,7 +7,7 @@ function hookLogEvent (binding) {
|
||||
}
|
||||
const eventName = modifiers[0]
|
||||
|
||||
logEvent(eventName, binding.value)
|
||||
useAmplitude().logEvent(eventName, binding.value)
|
||||
}
|
||||
|
||||
export default defineNuxtPlugin(nuxtApp => {
|
||||
|
||||
5
client/plugins/crisp.client.js
vendored
5
client/plugins/crisp.client.js
vendored
@@ -3,8 +3,9 @@ import config from "~/opnform.config.js";
|
||||
|
||||
export default defineNuxtPlugin(nuxtApp => {
|
||||
const isIframe = useIsIframe()
|
||||
if (config.crisp_website_id && !isIframe) {
|
||||
Crisp.configure(config.crisp_website_id)
|
||||
const crispWebsiteId = useRuntimeConfig().public.crispWebsiteId
|
||||
if (crispWebsiteId && !isIframe) {
|
||||
Crisp.configure(crispWebsiteId)
|
||||
window.Crisp = Crisp
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user