Browse Source

Vacation planner tile

Kirk Trombley 5 years ago
parent
commit
d0669cde81
2 changed files with 18 additions and 0 deletions
  1. 2 0
      src/App.js
  2. 16 0
      src/components/tiles/VacationPlanner.jsx

+ 2 - 0
src/App.js

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

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

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