migrate-to-nuxt-useappconfig (#263)
* migrate-to-nuxt-useappconfig * defineAppConfig --------- Co-authored-by: Forms Dev <chirag+new@notionforms.io>
This commit is contained in:
parent
5c093b78fc
commit
56e533581c
|
@ -0,0 +1,7 @@
|
||||||
|
// https://nuxt.com/docs/guide/directory-structure/app-config
|
||||||
|
|
||||||
|
import opnformConfig from "~/opnform.config.js";
|
||||||
|
|
||||||
|
export default defineAppConfig({
|
||||||
|
...opnformConfig
|
||||||
|
})
|
|
@ -152,7 +152,7 @@ export default {
|
||||||
appStore: useAppStore(),
|
appStore: useAppStore(),
|
||||||
formsStore: useFormsStore(),
|
formsStore: useFormsStore(),
|
||||||
workspacesStore: useWorkspacesStore(),
|
workspacesStore: useWorkspacesStore(),
|
||||||
config: useConfig(),
|
config: useAppConfig(),
|
||||||
user: computed(() => authStore.user),
|
user: computed(() => authStore.user),
|
||||||
isIframe: useIsIframe(),
|
isIframe: useIsIframe(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,11 +16,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
async setup(props) {
|
async setup(props) {
|
||||||
const apiUrl = useConfig().notion.worker
|
const apiUrl = useAppConfig().notion.worker
|
||||||
const {data} = await useFetch(`${apiUrl}/page/${props.pageId}`)
|
const {data} = await useFetch(`${apiUrl}/page/${props.pageId}`)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
apiUrl: useConfig().notion.worker,
|
apiUrl: useAppConfig().notion.worker,
|
||||||
blockMap: data,
|
blockMap: data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
zapierUrl: () => useConfig().links.zapier_integration
|
zapierUrl: () => useAppConfig().links.zapier_integration
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
aiFeaturesEnabled () {
|
aiFeaturesEnabled () {
|
||||||
return useConfig().ai_features_enabled
|
return useAppConfig().ai_features_enabled
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
import opnformConfig from "~/opnform.config.js";
|
|
||||||
export const useConfig = () => opnformConfig
|
|
|
@ -203,7 +203,7 @@ export default {
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
return {
|
return {
|
||||||
authenticated: computed(() => authStore.check),
|
authenticated: computed(() => authStore.check),
|
||||||
config: useConfig()
|
config: useAppConfig()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue