Kirk Trombley 5 лет назад
Родитель
Сommit
53174afe93
2 измененных файлов с 18 добавлено и 0 удалено
  1. 2 0
      src/App.js
  2. 16 0
      src/components/tiles/Rollbot.jsx

+ 2 - 0
src/App.js

@@ -5,6 +5,7 @@ import TerrAssumptions from './components/tiles/TerrAssumptions';
 import CommaFeed from './components/tiles/CommaFeed';
 import Gogs from './components/tiles/Gogs';
 import Minecraft from './components/tiles/Minecraft';
+import Rollbot from './components/tiles/Rollbot';
 
 export default () => (
   <div className="App">
@@ -13,5 +14,6 @@ export default () => (
     <CommaFeed/>
     <Gogs/>
     <Minecraft/>
+    <Rollbot/>
   </div>
 );

+ 16 - 0
src/components/tiles/Rollbot.jsx

@@ -0,0 +1,16 @@
+import React from "react";
+import Tile from "../shared/Tile";
+import useHealthPolling from "../../hooks/useHealthPolling";
+
+const rollbotHealth = "https://kirkleon.ddns.net/rollbot/health";
+const update = 1000 * 60 * 20;
+
+export default () => {
+  const health = useHealthPolling(rollbotHealth, { ms: update })
+
+  return <Tile
+    link="https://kirkleon.ddns.net/gogs/kirkleon/rollbot3"
+    title="Rollbot"
+    health={health}
+  />
+}