mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
always fetch tweets on main page load
This commit is contained in:
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} />;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user