Skip to content

Commit

Permalink
fix(runtime): add imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dargmuesli committed Dec 8, 2022
1 parent 3b8d631 commit 5f5d7c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/components/CookieControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@

<script setup lang="ts">
import Cookies from 'js-cookie'
import { ref, computed, onBeforeMount } from 'vue'
import { Cookie, CookieType, Locale, Translatable } from '../types'
import {
Expand All @@ -150,6 +151,8 @@ import {
useResolveTranslatable,
} from '../methods'
import { useCookieControl } from '#imports'
export interface Props {
locale?: Locale
}
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/components/CookieIframe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { LOCALE_DEFAULT } from '../constants'
import { Locale } from '../types'
import { useCookieControl } from '#imports'
export interface Props {
locale?: Locale
}
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/composables.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import { useNuxtApp } from '#imports'

export const useCookieControl = () => useNuxtApp().$cookies
2 changes: 2 additions & 0 deletions src/runtime/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ref } from 'vue'
import { setConsent } from './methods'
import { Cookie, State } from './types'

import { defineNuxtPlugin } from '#imports'
import moduleOptions from '#build/cookie-control-options'

export default defineNuxtPlugin((_nuxtApp) => {
Expand Down

0 comments on commit 5f5d7c8

Please sign in to comment.