summaryrefslogtreecommitdiff
path: root/src/containers/Service/ServiceContext.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-26 01:06:44 +0300
committereug-vs <eug-vs@keemail.me>2021-03-26 01:06:44 +0300
commit865b41114060765308d560181f4996c0aa7a3e74 (patch)
tree578d3089e05131445b0a8b6d5e69a3a76aaf7e73 /src/containers/Service/ServiceContext.tsx
parent91e1a3b4ccaa822097e4adfea5f51056b010fdd6 (diff)
downloadcommercel-ui-865b41114060765308d560181f4996c0aa7a3e74.tar.gz
refactor: move Service to lib/
Diffstat (limited to 'src/containers/Service/ServiceContext.tsx')
-rw-r--r--src/containers/Service/ServiceContext.tsx37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/containers/Service/ServiceContext.tsx b/src/containers/Service/ServiceContext.tsx
deleted file mode 100644
index 0cccc93..0000000
--- a/src/containers/Service/ServiceContext.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-import { FormikProps } from 'formik';
-import { Props as ButtonProps } from '../../components/Button';
-import { Field } from '../../components/ListTable';
-
-export interface Action extends ButtonProps {
- name: string;
-}
-
-export interface PanelProps {
- item: any;
- mutate: (item: any) => void;
-}
-
-export interface ServiceParams {
- route: string;
- name: string;
- nameSingular?: string;
- tableFields: Field[];
- default?: Record<string, any>;
- routes?: Record<string, React.FC>;
- actions?: Action[];
- rowLink?: (item: any) => string;
- Form?: React.FC<FormikProps<any>>;
- Panel?: React.FC<PanelProps>;
-}
-
-const ServiceContext = React.createContext<ServiceParams>({
- route: '',
- name: '',
- nameSingular: '',
- tableFields: [],
- default: {},
-});
-
-export const ServiceProvider = ServiceContext.Provider;
-export default ServiceContext;