summaryrefslogtreecommitdiff
path: root/src/contexts/ProductQuotationContext.js
blob: f9e178306ee7d6a88050f8d45a2d8d75a15e3bb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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>
  );
};