diff --git a/packages/react-shopper-hooks/example/App.tsx b/packages/react-shopper-hooks/example/App.tsx
index 6d80f9ad..e181cb80 100644
--- a/packages/react-shopper-hooks/example/App.tsx
+++ b/packages/react-shopper-hooks/example/App.tsx
@@ -4,27 +4,48 @@ import CartExample from "./CartExample"
import { CartProvider } from "../src/cart"
import { gateway as EPCCGateway } from "@moltin/sdk"
import { StoreProvider } from "../src/store"
+import { ElasticPathProvider } from "../src"
+import { QueryClient } from "@tanstack/react-query"
+import { ProductListExample } from "./ProductListExample"
+
+const client = EPCCGateway({
+ name: "my_store",
+ client_id: import.meta.env.VITE_APP_EPCC_CLIENT_ID,
+ client_secret: import.meta.env.VITE_APP_EPCC_CLIENT_SECRET,
+ host: import.meta.env.VITE_APP_EPCC_HOST,
+})
+
+const queryClient = new QueryClient()
function App() {
- const client = EPCCGateway({
- name: "my_store",
- client_id: import.meta.env.VITE_APP_EPCC_CLIENT_ID,
- client_secret: import.meta.env.VITE_APP_EPCC_CLIENT_SECRET,
- host: import.meta.env.VITE_APP_EPCC_HOST,
- })
+ const [activeItem, setActiveItem] = React.useState<"cart" | "products">(
+ "cart",
+ )
return (
React Shopper Hooks
+
+
+
+
-
-
-
-
-
+
+
+
+ {activeItem === "cart" && }
+ {activeItem === "products" && }
+
+
+
)
}
+function TanstackWrapper() {}
+
export default App
diff --git a/packages/react-shopper-hooks/example/CartExample.tsx b/packages/react-shopper-hooks/example/CartExample.tsx
index b2a8e046..5b30d9cb 100644
--- a/packages/react-shopper-hooks/example/CartExample.tsx
+++ b/packages/react-shopper-hooks/example/CartExample.tsx
@@ -1,16 +1,19 @@
import React from "react"
-import { useCart } from "../src/cart"
+import { useCart, useCartAddBundleItem, useCartClear } from "../src/cart"
export default function CartExample(): JSX.Element {
- const { state, addBundleProductToCart, emptyCart } = useCart()
+ const { state } = useCart()
+ const { mutate: addBundleProductToCart } = useCartAddBundleItem()
+ const { mutate: emptyCart } = useCartClear()
return (
<>