diff options
Diffstat (limited to 'src/containers/Service/ServiceContext.tsx')
-rw-r--r-- | src/containers/Service/ServiceContext.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/containers/Service/ServiceContext.tsx b/src/containers/Service/ServiceContext.tsx new file mode 100644 index 0000000..2602936 --- /dev/null +++ b/src/containers/Service/ServiceContext.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +export interface ServiceParams { + route: string; + name: string; + nameSingular: string; + tableFields: any[]; + Form: React.FC<any>; +} + +const ServiceContext = React.createContext<ServiceParams>({ + route: '', + name: '', + nameSingular: '', + tableFields: [], + Form: () => null, +}); + +export const ServiceProvider = ServiceContext.Provider; +export default ServiceContext; |