diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-06 17:05:01 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-06 17:05:01 +0700 |
| commit | a63b03fffdf46ecddecf356d1d00d6582add75cf (patch) | |
| tree | 0d63373698266691fb214bd6c55cabad6e16eefe /src/contexts | |
| parent | 807931ee9bcb063157ceb8368e5ee0941450c6ca (diff) | |
<iman> update cart pop up
Diffstat (limited to 'src/contexts')
| -rw-r--r-- | src/contexts/ProductCartContext.js | 4 | ||||
| -rw-r--r-- | src/contexts/ProductQuotationContext.js | 17 |
2 files changed, 3 insertions, 18 deletions
diff --git a/src/contexts/ProductCartContext.js b/src/contexts/ProductCartContext.js index 06e97563..19889e07 100644 --- a/src/contexts/ProductCartContext.js +++ b/src/contexts/ProductCartContext.js @@ -4,12 +4,14 @@ const ProductCartContext = createContext() export const ProductCartProvider = ({ children }) => { const [productCart, setProductCart] = useState(null) + const [productQuotation, setProductQuotation] = useState(null) + const [refreshQuotation, setRefreshQuotation] = useState(false) const [refreshCart, setRefreshCart] = useState(false) const [isLoading, setIsloading] = useState(false) return ( <ProductCartContext.Provider - value={{ productCart, setProductCart, refreshCart, setRefreshCart, isLoading, setIsloading }} + value={{ productCart, setProductCart, refreshCart, setRefreshCart, isLoading, setIsloading, productQuotation, setProductQuotation, refreshQuotation, setRefreshQuotation }} > {children} </ProductCartContext.Provider> diff --git a/src/contexts/ProductQuotationContext.js b/src/contexts/ProductQuotationContext.js deleted file mode 100644 index f9e17830..00000000 --- a/src/contexts/ProductQuotationContext.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { createContext, useContext, useState } from 'react'; - -const ProductQuotationContext = createContext(); - -export const useProductQuotationContext = () => useContext(ProductQuotationContext); - -export const ProductQuotationProvider = ({ children }) => { - const [productQuotation, setProductQuotation] = useState([]); - const [refreshQuotation, setRefreshQuotation] = useState(false); - const [isLoading, setIsloading] = useState(false); - - return ( - <ProductQuotationContext.Provider value={{ productQuotation, setProductQuotation, refreshQuotation, setRefreshQuotation, isLoading, setIsloading }}> - {children} - </ProductQuotationContext.Provider> - ); -}; |
