mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 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(() => {
|
useEffect(() => {
|
||||||
Nui.send("phone:getOrCreateTwitterProfile", {});
|
Nui.send("phone:getOrCreateTwitterProfile", {});
|
||||||
Nui.send("phone:fetchTweets", {});
|
|
||||||
|
|
||||||
// this is a polling implementation. It is possible that
|
// this is a polling implementation. It is possible that
|
||||||
// there is some interaction where, on a new tweet, all
|
// 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 { useTweets } from "../../hooks/useTweets";
|
||||||
import TweetList from "./TweetList";
|
import TweetList from "./TweetList";
|
||||||
|
|
||||||
export function TweetListContainer() {
|
export function TweetListContainer() {
|
||||||
const { tweets } = useTweets();
|
const { tweets } = useTweets();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
Nui.send("phone:fetchTweets", {});
|
||||||
|
}, []);
|
||||||
|
|
||||||
return <TweetList tweets={tweets} />;
|
return <TweetList tweets={tweets} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user