mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
re-structure to monorepo.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// @ts-nocheck
|
||||
import React, { createContext, useContext } from 'react';
|
||||
import { DialogContent } from '@/components';
|
||||
import { useSettingsInvoices } from '@/hooks/query';
|
||||
|
||||
const InvoiceNumberDialogContext = createContext();
|
||||
|
||||
/**
|
||||
* Invoice number dialog provider.
|
||||
*/
|
||||
function InvoiceNumberDialogProvider({ query, ...props }) {
|
||||
const { isLoading: isSettingsLoading } = useSettingsInvoices();
|
||||
|
||||
// Provider payload.
|
||||
const provider = {
|
||||
isSettingsLoading,
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogContent isLoading={isSettingsLoading}>
|
||||
<InvoiceNumberDialogContext.Provider value={provider} {...props} />
|
||||
</DialogContent>
|
||||
);
|
||||
}
|
||||
|
||||
const useInvoiceNumberDialogContext = () =>
|
||||
useContext(InvoiceNumberDialogContext);
|
||||
|
||||
export { InvoiceNumberDialogProvider, useInvoiceNumberDialogContext };
|
||||
Reference in New Issue
Block a user