always fetch tweets on main page load

This commit is contained in:
erik-sn committed 2020-10-05 22:02:38 -04:00
1 parent c2e1f17f3b
commit 581d6011e0
2 files changed
+7 -2

No files matched your search

@@ -43,7 +43,6 @@ export const TwitterApp = () => {
useEffect(() => {
Nui.send("phone:getOrCreateTwitterProfile", {});
Nui.send("phone:fetchTweets", {});
// this is a polling implementation. It is possible that
// there is some interaction where, on a new tweet, all
@@ -1,10 +1,16 @@
import React from "react";
import React, { useEffect } from "react";
import Nui from "../../../../os/nui-events/utils/Nui";
import { useTweets } from "../../hooks/useTweets";
import TweetList from "./TweetList";
export function TweetListContainer() {
const { tweets } = useTweets();
useEffect(() => {
Nui.send("phone:fetchTweets", {});
}, []);
return <TweetList tweets={tweets} />;
}