@23blocks/react 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -498,7 +498,7 @@ import { createProductsBlock } from '@23blocks/block-products';
498
498
  async function getProducts() {
499
499
  const transport = createHttpTransport({
500
500
  baseUrl: process.env.PRODUCTS_URL!,
501
- headers: () => ({ 'api-key': process.env.API_KEY! }),
501
+ headers: () => ({ 'x-api-key': process.env.API_KEY! }),
502
502
  });
503
503
 
504
504
  const products = createProductsBlock(transport, {
@@ -565,7 +565,7 @@ export function BlocksProvider({ children }: { children: React.ReactNode }) {
565
565
  if (typeof window === 'undefined') return {};
566
566
  const token = localStorage.getItem('access_token');
567
567
  return {
568
- 'api-key': process.env.NEXT_PUBLIC_API_KEY!,
568
+ 'x-api-key': process.env.NEXT_PUBLIC_API_KEY!,
569
569
  ...(token ? { Authorization: `Bearer ${token}` } : {}),
570
570
  };
571
571
  },
package/dist/index.esm.js CHANGED
@@ -309,7 +309,7 @@ const Blocks23Context = /*#__PURE__*/ createContext(null);
309
309
  credentials: authMode === 'cookie' ? 'include' : undefined,
310
310
  headers: ()=>{
311
311
  const headers = _({}, staticHeaders, {
312
- 'api-key': apiKey
312
+ 'x-api-key': apiKey
313
313
  });
314
314
  if (tenantId) {
315
315
  headers['tenant-id'] = tenantId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@23blocks/react",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "React bindings for 23blocks SDK - hooks and context providers",
5
5
  "license": "MIT",
6
6
  "author": "23blocks <hello@23blocks.com>",