From c222bc06f9c123d3e2fa4a428d74032f54887485 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sat, 17 Apr 2021 19:56:30 +0300
Subject: feat: add ServiceSearch

---
 src/lib/ServiceList.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/lib/ServiceList.tsx')

diff --git a/src/lib/ServiceList.tsx b/src/lib/ServiceList.tsx
index ae17a9c..8983bfa 100644
--- a/src/lib/ServiceList.tsx
+++ b/src/lib/ServiceList.tsx
@@ -6,6 +6,7 @@ import ListTable from '../components/ListTable';
 import hooks from '../hooks/useAPIClient';
 import ServiceContext from './ServiceContext';
 import ServiceFilters from './ServiceFilters';
+import ServiceSearch from './ServiceSearch';
 
 const ServiceList: React.FC = () => {
   const service = useContext(ServiceContext);
@@ -26,11 +27,18 @@ const ServiceList: React.FC = () => {
     history.push(route);
   };
 
+  const filters = (
+    <>
+      {service.searchBy && <ServiceSearch />}
+      {service.filters && <ServiceFilters />}
+    </>
+  );
+
   return (
     <Page
       title={service.name}
       actions={actions}
-      filters={<ServiceFilters />}
+      filters={filters}
     >
       <ListTable items={data} fields={service.tableFields} handleRowClick={handleRowClick} />
     </Page>
-- 
cgit v1.2.3

