Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The WidgetsProvider
is the root provider for building a React application with Sitecore Discover platform. It allows to use the SDK hooks in the inner components.
It must wrap any components where you are using hooks.
Note: In this method, Sitecore Discover needs a way to recognize who is calling the API and that's done through the access token. Warning: this method may lead to security vulnerabilities for that we are exposing the access token in the web page. We don't recommend using this approach on production environments.
Note: This approach does not require an access token for authentication because Sitecore Discover guarantees that the origin of all requests are from the customer's website.
The WidgetsProvider
exported by the @sitecore-search/react package accepts the following props.
Name | Description | Type |
---|---|---|
env | Environment from where the data should be gathered. Posible values: apse2 (for Asia/Oceania domains), prodEu (for European domains), or prod (for US domains). | string |
apiKey | API key generated by Discover. Required for no subdomain setup. | string |
customerKey | Customer ID provided by Discover. | string |
serviceHost | API host provided by Discover. Required for subdomain setup. | string |
pubicSuffix | Gets the domain to be used to register SDK cookies. if publicSuffix is false (default value) will return only the subdomain to have a cross subdomain cookie. Otherwise, with publicSuffix = true, the full domain will be gathered meaning that cross subdomain cookies are not allowed in this case. e.g: - public suffix false, domain = donatello-delta.vercel.app => vercel.app - public suffix true, domain = donatello-delta.vercel.app => donatello-delta.vercel.app | boolean |