-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tool-nuxt): add composables and fix types #78
fix(tool-nuxt): add composables and fix types #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part is already moved to nuxt-base
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copied & modified from tool-plugins/nextjs-starter
const appBridge = useAppBridge(); | ||
const nuxtApp = useNuxtApp(); | ||
nuxtApp.provide('appBridge', { | ||
completed, | ||
appBridgeAuth, | ||
oauth, | ||
}); | ||
nuxtApp.provide('appBridge', appBridge); | ||
</script> | ||
|
||
<template> | ||
<slot v-if="!config.appBridge.enabled || completed" /> | ||
<slot v-if="!config.appBridge.enabled || appBridge.completed.value" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there's a possibility to add more to the return of useAppBridge, I provide the whole appBridge instead of spreading and passing everything.
Because of that change, I had to put appBridge.completed.value
in the v-if.
(Not appBridge.completed
, because appBridge.completed
is still a ref object there. Let me know if you don't understand why it's still not a ref object there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking neat 💯
4bf0a19
into
SHAPE-6288-starter-for-tool-plugin
What?
This PR
useAutoHeight()
anduseStoryContext()
composables