Skip to content

Commit

Permalink
feat: replace use cart hook with new use cart
Browse files Browse the repository at this point in the history
  • Loading branch information
field123 committed Jan 12, 2024
1 parent 9956b1c commit 0bd2843
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 551 deletions.
2 changes: 1 addition & 1 deletion packages/react-shopper-hooks/src/cart/cart-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function createCartItemsUpdater(updatedData: CartItem[]) {
}
}
}
export const useCartTemp = () => {
export const useCart = () => {
const context = React.useContext(CartItemsContext)
if (!context) {
throw new Error("useCart must be used within a CartProvider")
Expand Down
1 change: 0 additions & 1 deletion packages/react-shopper-hooks/src/cart/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./cart-provider"
export * from "./use-cart-hook"
export * from "./types/cart-types"
export * from "./hooks"
export * from "./util"
Loading

0 comments on commit 0bd2843

Please sign in to comment.