diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-06 14:32:41 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-06 14:32:41 +0700 |
| commit | 807931ee9bcb063157ceb8368e5ee0941450c6ca (patch) | |
| tree | 26501b59521a418a34c5bdf163750f8795b8d534 /src/contexts | |
| parent | 1ce47f63e967d32d8e6026c0f2e8da931d23fd4c (diff) | |
<iman> add quotation pop up
Diffstat (limited to 'src/contexts')
| -rw-r--r-- | src/contexts/ProductQuotationContext.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/contexts/ProductQuotationContext.js b/src/contexts/ProductQuotationContext.js new file mode 100644 index 00000000..f9e17830 --- /dev/null +++ b/src/contexts/ProductQuotationContext.js @@ -0,0 +1,17 @@ +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> + ); +}; |
