Skip to content
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

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

eunjae-lee
Copy link
Contributor

What?

This PR

  • adds useAutoHeight() and useStoryContext() composables
  • fix types

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Comment on lines +3 to +9
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" />
Copy link
Contributor Author

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)

Copy link
Contributor

@BibiSebi BibiSebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking neat 💯

@eunjae-lee eunjae-lee merged commit 4bf0a19 into SHAPE-6288-starter-for-tool-plugin Jul 31, 2024
1 check passed
@eunjae-lee eunjae-lee deleted the fix/tool-plugin branch July 31, 2024 01:36
BibiSebi pushed a commit that referenced this pull request Aug 1, 2024
* feat(tool-nuxt): add starter

* docs(tool-nuxt): update README (#77)

* fix(tool-nuxt): add composables and fix types (#78)

* fix(tool-nuxt): add composables and fix types

* update lock file

* import icon explicitly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants