@cimplify/cli 0.7.16 → 0.7.18
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/dist/{add-YRLROMEN.mjs → add-UXXUPBKR.mjs} +1 -1
- package/dist/{chunk-ATCBAM44.mjs → chunk-GAN7PG6N.mjs} +2 -2
- package/dist/{chunk-7PNEG4JY.mjs → chunk-HWHV62KB.mjs} +18 -18
- package/dist/{chunk-7CCC37ER.mjs → chunk-MR3Q43SU.mjs} +1 -1
- package/dist/dispatcher.mjs +11 -11
- package/dist/{doctor-UMTO3BI6.mjs → doctor-IGQNPWUY.mjs} +2 -2
- package/dist/{explain-2VWT5OFP.mjs → explain-IK2FYBB7.mjs} +2 -2
- package/dist/{introspect-PCLYGIDK.mjs → introspect-ZS6I46OO.mjs} +2 -2
- package/dist/{list-6FUJKW7D.mjs → list-P74FSKQR.mjs} +1 -1
- package/dist/{projects-JSEC2YCX.mjs → projects-QSUWVTJZ.mjs} +27 -4
- package/dist/{update-CCNTKRPV.mjs → update-E6Q3KV3B.mjs} +1 -1
- package/package.json +2 -2
- package/templates/storefront-auto/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-auto/app/layout.tsx +11 -2
- package/templates/storefront-auto/components/order-detail.tsx +11 -0
- package/templates/storefront-auto/components/providers.tsx +17 -3
- package/templates/storefront-auto/package.json +1 -1
- package/templates/storefront-bakery/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-bakery/app/layout.tsx +11 -2
- package/templates/storefront-bakery/components/order-detail.tsx +11 -0
- package/templates/storefront-bakery/components/providers.tsx +17 -3
- package/templates/storefront-bakery/package.json +1 -1
- package/templates/storefront-fashion/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-fashion/app/layout.tsx +11 -2
- package/templates/storefront-fashion/components/order-detail.tsx +11 -0
- package/templates/storefront-fashion/components/providers.tsx +17 -3
- package/templates/storefront-fashion/package.json +1 -1
- package/templates/storefront-grocery/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-grocery/app/layout.tsx +11 -2
- package/templates/storefront-grocery/components/order-detail.tsx +11 -0
- package/templates/storefront-grocery/components/providers.tsx +17 -3
- package/templates/storefront-grocery/package.json +1 -1
- package/templates/storefront-pharmacy/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-pharmacy/app/layout.tsx +11 -2
- package/templates/storefront-pharmacy/components/order-detail.tsx +11 -0
- package/templates/storefront-pharmacy/components/providers.tsx +17 -3
- package/templates/storefront-pharmacy/package.json +1 -1
- package/templates/storefront-restaurant/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-restaurant/app/layout.tsx +11 -2
- package/templates/storefront-restaurant/components/order-detail.tsx +11 -0
- package/templates/storefront-restaurant/components/providers.tsx +17 -3
- package/templates/storefront-restaurant/package.json +1 -1
- package/templates/storefront-retail/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-retail/app/layout.tsx +11 -2
- package/templates/storefront-retail/components/order-detail.tsx +11 -0
- package/templates/storefront-retail/components/providers.tsx +17 -3
- package/templates/storefront-retail/package.json +1 -1
- package/templates/storefront-services/app/account/orders/[id]/page.tsx +42 -0
- package/templates/storefront-services/app/layout.tsx +11 -2
- package/templates/storefront-services/components/order-detail.tsx +11 -0
- package/templates/storefront-services/components/providers.tsx +17 -3
- package/templates/storefront-services/package.json +1 -1
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useMemo, type ReactNode } from "react";
|
|
4
|
-
import { createCimplifyClient } from "@cimplify/sdk";
|
|
4
|
+
import { createCimplifyClient, type Business, type Location } from "@cimplify/sdk";
|
|
5
5
|
import { CimplifyProvider, CartDrawerProvider } from "@cimplify/sdk/react";
|
|
6
6
|
import { AuthErrorToast } from "@/components/auth-error-toast";
|
|
7
7
|
|
|
8
8
|
// Same-origin client — every request goes through the Next.js rewrite in
|
|
9
9
|
// next.config.ts, so no CORS preflight ever hits the browser.
|
|
10
|
-
export function Providers({
|
|
10
|
+
export function Providers({
|
|
11
|
+
children,
|
|
12
|
+
initialBusiness,
|
|
13
|
+
initialLocations,
|
|
14
|
+
}: {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
// Server-fetched in app/layout.tsx so prices render in the right currency
|
|
17
|
+
// during SSR (no default-currency flash before the client bootstrap).
|
|
18
|
+
initialBusiness?: Business | null;
|
|
19
|
+
initialLocations?: Location[];
|
|
20
|
+
}) {
|
|
11
21
|
const client = useMemo(() => {
|
|
12
22
|
const baseUrl =
|
|
13
23
|
typeof window !== "undefined" ? window.location.origin : "http://127.0.0.1:8787";
|
|
@@ -20,7 +30,11 @@ export function Providers({ children }: { children: ReactNode }) {
|
|
|
20
30
|
}, []);
|
|
21
31
|
|
|
22
32
|
return (
|
|
23
|
-
<CimplifyProvider
|
|
33
|
+
<CimplifyProvider
|
|
34
|
+
client={client}
|
|
35
|
+
initialBusiness={initialBusiness}
|
|
36
|
+
initialLocations={initialLocations}
|
|
37
|
+
>
|
|
24
38
|
<CartDrawerProvider>
|
|
25
39
|
{children}
|
|
26
40
|
<AuthErrorToast />
|