migrate-to-nuxt-useappconfig (#263)

* migrate-to-nuxt-useappconfig

* defineAppConfig

---------

Co-authored-by: Forms Dev <chirag+new@notionforms.io>
This commit is contained in:
Chirag Chhatrala
2023-12-22 20:15:53 +05:30
committed by GitHub
parent 5c093b78fc
commit 56e533581c
7 changed files with 13 additions and 8 deletions

View File

@@ -152,7 +152,7 @@ export default {
appStore: useAppStore(),
formsStore: useFormsStore(),
workspacesStore: useWorkspacesStore(),
config: useConfig(),
config: useAppConfig(),
user: computed(() => authStore.user),
isIframe: useIsIframe(),
}

View File

@@ -16,11 +16,11 @@ export default {
},
async setup(props) {
const apiUrl = useConfig().notion.worker
const apiUrl = useAppConfig().notion.worker
const {data} = await useFetch(`${apiUrl}/page/${props.pageId}`)
return {
apiUrl: useConfig().notion.worker,
apiUrl: useAppConfig().notion.worker,
blockMap: data,
}
}