formatting

This commit is contained in:
erik-sn committed 2020-10-18 13:38:01 -04:00
1 parent e48263838f
commit 3a1bd75f97
23 files changed
+309 -236

No files matched your search

+2 -2
View File
@@ -38,7 +38,7 @@ export const twitterState = {
default: null,
}),
notification: atom({
key: 'notification',
key: "notification",
default: null,
})
}),
};
@@ -4,7 +4,7 @@ import { Tweet } from "../interfaces";
import { twitterState } from "./state";
interface ITwitterNotification {
notification: Tweet | null;
notification: Tweet | null;
}
export const useTwitterNotification = (): ITwitterNotification => {
@@ -6,7 +6,6 @@ import { IMAGE_DELIMITER } from "../utils/images";
import { APP_TWITTER } from "../utils/constants";
import { twitterState } from "./state";
/**
* Perform all necessary processing/transforms from the raw database
* data to what the frontend expects
@@ -59,7 +58,7 @@ export const useTwitterService = () => {
const _setNotification = (tweet) => {
setNotification(tweet);
}
};
const _setTweets = (tweets) => {
setTweets(tweets.map(processTweet));
@@ -75,5 +74,5 @@ export const useTwitterService = () => {
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);
};