@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
24 lines (23 loc) • 923 B
TypeScript
/**
* Nuxt plugin to provide the current shop and available shops.
*
* This plugin makes the current shop and available shops accessible through the Nuxt app instance.
* It retrieves the shop data from the server context during server-side rendering and provides it to the client.
*
* @see https://nuxt.com/docs/guide/directory-structure/plugins#providing-helpers
*
* @returns A helper on the `NuxtApp` containing the `currentShop` and `availableShops`.
*
* @example
* ```typescript
* const { currentShop, availableShop } = useNuxtApp()
* ```
*/
declare const _default: import("#app").Plugin<{
currentShop: import("../../index.js").PublicShopConfig;
availableShops: import("../../index.js").PublicShopConfig[];
}> & import("#app").ObjectPlugin<{
currentShop: import("../../index.js").PublicShopConfig;
availableShops: import("../../index.js").PublicShopConfig[];
}>;
export default _default;