From 2c106d1d3f6d59b10ad946e01e8bb3d0df587e40 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 14 Mar 2021 10:10:16 +0300
Subject: refactor: create Service abstraction

---
 src/containers/Service/ServiceContext.tsx | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 src/containers/Service/ServiceContext.tsx

(limited to 'src/containers/Service/ServiceContext.tsx')

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;
-- 
cgit v1.2.3

