|
@@ -1,4 +1,3 @@
|
|
|
-import React from "react";
|
|
|
import { OK } from "../shared/StatusMessage";
|
|
|
import Tile from "../shared/Tile";
|
|
|
import useApi from "../../hooks/useApi";
|
|
@@ -10,7 +9,7 @@ const apiOptions = { ms, fetchOptions };
|
|
|
const homepage = `https://${window.location.hostname}/commafeed/`;
|
|
|
const unreadLookup = `https://${window.location.hostname}/commafeed/rest/category/entries?id=all&limit=20&offset=0&order=desc&readType=unread`;
|
|
|
|
|
|
-export default () => {
|
|
|
+const CommaFeed = () => {
|
|
|
const health = useHealthPolling(homepage, { ms });
|
|
|
const [apiRes, data] = useApi(unreadLookup, apiOptions);
|
|
|
|
|
@@ -26,4 +25,6 @@ export default () => {
|
|
|
health={health}
|
|
|
data={message}
|
|
|
/>
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+export default CommaFeed;
|