@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 +2 -2
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
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;
|