UNPKG

@scayle/storefront-nuxt

Version:

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

16 lines (15 loc) 690 B
import type { H3Event } from 'h3'; /** * Handles redirects based on the provided event. * * This middleware function checks for redirects configured in the SCAYLE Panel * by checking with the Storefront API and performs a redirect if a match is found. * It utilizes a cache to store redirect results and falls back to the * Storefront API if no cached redirect is available. * * @see https://scayle.dev/en/core-documentation/storefront-guide/storefront-application/features/redirects#overview * @see https://scayle.dev/en/core-documentation/the-basics/shops/redirects * * @param event The H3 event object. */ export declare function useRedirects(event: H3Event): Promise<void>;