Browse Source

Add Searx and Grocy

Kirk Trombley 4 years ago
parent
commit
275297b6ce
3 changed files with 38 additions and 0 deletions
  1. 4 0
      src/App.js
  2. 17 0
      src/components/tiles/Grocy.jsx
  3. 17 0
      src/components/tiles/Searx.jsx

+ 4 - 0
src/App.js

@@ -10,6 +10,8 @@ import VacationPlanner from './components/tiles/VacationPlanner';
 import DroneCI from './components/tiles/DroneCI';
 import Etherpad from './components/tiles/Etherpad';
 import Nextcloud from './components/tiles/Nextcloud';
+import Grocy from './components/tiles/Grocy';
+import Searx from './components/tiles/Searx';
 
 const App = () => (
   <div className="App">
@@ -23,6 +25,8 @@ const App = () => (
     <DroneCI/>
     <Etherpad/>
     <Nextcloud/>
+    <Grocy/>
+    <Searx/>
   </div>
 );
 

+ 17 - 0
src/components/tiles/Grocy.jsx

@@ -0,0 +1,17 @@
+import Tile from "../shared/Tile";
+import useHealthPolling from "../../hooks/useHealthPolling";
+
+const grocyUrl = `https://grocy.hiram.services/`;
+const update = 1000 * 60 * 20;
+
+const Grocy = () => {
+  const health = useHealthPolling(grocyUrl, { ms: update })
+
+  return <Tile
+    link={grocyUrl}
+    title="Grocy"
+    health={health}
+  />
+}
+
+export default Grocy;

+ 17 - 0
src/components/tiles/Searx.jsx

@@ -0,0 +1,17 @@
+import Tile from "../shared/Tile";
+import useHealthPolling from "../../hooks/useHealthPolling";
+
+const searxUrl = `https://search.hiram.services/`;
+const update = 1000 * 60 * 20;
+
+const Searx = () => {
+  const health = useHealthPolling(searxUrl, { ms: update })
+
+  return <Tile
+    link={searxUrl}
+    title="Searx"
+    health={health}
+  />
+}
+
+export default Searx;