mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Remove client phoneConfig event (#73)
* Remove client phoneConfig event * Remove unused debug * Remove unused import * Remove unused import * Remove duplicated functions | fix useEffect dependency | etc * Fix warnings * Update phone/src/apps/twitter/components/TwitterApp.tsx Co-authored-by: Taso <[email protected]> Co-authored-by: Taso <[email protected]>
This commit is contained in:
1 parent
fdfd4133e2
commit
81f5e27064
12 files changed
+61
-81
No files matched your search
@@ -43,9 +43,6 @@ export const useTwitterService = () => {
|
||||
);
|
||||
const setNotification = useSetRecoilState(twitterState.notification);
|
||||
|
||||
const _setProfile = (profile) => {
|
||||
setProfile(profile);
|
||||
};
|
||||
const _setUpdateProfileSuccess = (isSuccessful) => {
|
||||
setUpdateProfileSuccess(isSuccessful);
|
||||
setUpdateProfileLoading(false); // on any result we should set loading to false
|
||||
@@ -56,10 +53,6 @@ export const useTwitterService = () => {
|
||||
setCreateLoading(false);
|
||||
};
|
||||
|
||||
const _setNotification = (tweet) => {
|
||||
setNotification(tweet);
|
||||
};
|
||||
|
||||
const _setTweets = (tweets) => {
|
||||
setTweets(tweets.map(processTweet));
|
||||
};
|
||||
@@ -67,12 +60,12 @@ export const useTwitterService = () => {
|
||||
setFilteredTweets(tweets.map(processTweet));
|
||||
};
|
||||
|
||||
useNuiEvent(APP_TWITTER, 'getOrCreateTwitterProfile', _setProfile);
|
||||
useNuiEvent(APP_TWITTER, 'getOrCreateTwitterProfile', setProfile);
|
||||
useNuiEvent(APP_TWITTER, 'updateProfileLoading', setUpdateProfileLoading);
|
||||
useNuiEvent(APP_TWITTER, 'updateProfileResult', _setUpdateProfileSuccess);
|
||||
useNuiEvent(APP_TWITTER, 'fetchTweets', _setTweets);
|
||||
useNuiEvent(APP_TWITTER, 'fetchTweetsFiltered', _setFilteredTweets);
|
||||
useNuiEvent(APP_TWITTER, 'createTweetLoading', setCreateLoading);
|
||||
useNuiEvent(APP_TWITTER, 'createTweetResult', _setCreateSuccess);
|
||||
useNuiEvent(APP_TWITTER, 'createTweetBroadcast', _setNotification);
|
||||
useNuiEvent(APP_TWITTER, 'createTweetBroadcast', setNotification);
|
||||
};
|
||||
Reference in new issue
Block a user