Skip to content

Commit

Permalink
fix: export as default to fix the ts declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawntraoz committed Jan 14, 2023
1 parent 537181a commit c0b19c3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/src/runtime/composables/useAsyncStoryblok.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { useStoryblokApi, useStoryblokBridge } from "@storyblok/vue";
import { useAsyncData, useState, onMounted } from "#imports";

export const useAsyncStoryblok = async (
url,
apiOptions = {},
bridgeOptions = {}
) => {
const useAsyncStoryblok = async (url, apiOptions = {}, bridgeOptions = {}) => {
const uniqueKey = `${JSON.stringify(apiOptions)}${url}`;
const story = useState(`${uniqueKey}-state`, () => null);
const storyblokApiInstance = useStoryblokApi();
Expand All @@ -28,3 +24,5 @@ export const useAsyncStoryblok = async (

return story;
};

export default useAsyncStoryblok;

0 comments on commit c0b19c3

Please sign in to comment.