mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
styling: Enforced styling across all files (#55)
This commit is contained in:
165 files changed
+1879
-1725
No files matched your search
@@ -1,44 +1,44 @@
|
||||
import { atom } from "recoil";
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const twitterState = {
|
||||
profile: atom({
|
||||
key: "profile",
|
||||
key: 'profile',
|
||||
default: {},
|
||||
}),
|
||||
tweets: atom({
|
||||
key: "tweets",
|
||||
key: 'tweets',
|
||||
default: null,
|
||||
}),
|
||||
filteredTweets: atom({
|
||||
key: "filteredTweets",
|
||||
key: 'filteredTweets',
|
||||
default: null,
|
||||
}),
|
||||
showCreateTweetModal: atom({
|
||||
key: "showCreateTweetModal",
|
||||
key: 'showCreateTweetModal',
|
||||
default: false,
|
||||
}),
|
||||
modalMessage: atom({
|
||||
key: "modalMessage",
|
||||
default: "",
|
||||
key: 'modalMessage',
|
||||
default: '',
|
||||
}),
|
||||
createTweetLoading: atom({
|
||||
key: "createTweetLoading",
|
||||
key: 'createTweetLoading',
|
||||
default: false,
|
||||
}),
|
||||
createTweetSuccessful: atom({
|
||||
key: "createTweetSuccessful",
|
||||
key: 'createTweetSuccessful',
|
||||
default: null,
|
||||
}),
|
||||
updateProfileLoading: atom({
|
||||
key: "updateProfileLoading",
|
||||
key: 'updateProfileLoading',
|
||||
default: false,
|
||||
}),
|
||||
updateProfileSuccess: atom({
|
||||
key: "updateProfileSuccess",
|
||||
key: 'updateProfileSuccess',
|
||||
default: null,
|
||||
}),
|
||||
notification: atom({
|
||||
key: "notification",
|
||||
key: 'notification',
|
||||
default: null,
|
||||
})
|
||||
}),
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRecoilState } from "recoil";
|
||||
import { twitterState } from "./state";
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { twitterState } from './state';
|
||||
|
||||
export const useFilteredTweets = () => {
|
||||
const [tweets, setTweets] = useRecoilState(twitterState.filteredTweets);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRecoilState } from "recoil";
|
||||
import { twitterState } from "./state";
|
||||
import { useRecoilState } from 'recoil';
|
||||
import { twitterState } from './state';
|
||||
|
||||
export const useModal = () => {
|
||||
const [modalVisible, setModalVisible] = useRecoilState(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRecoilValue, useRecoilState } from "recoil";
|
||||
import { twitterState } from "./state";
|
||||
import { useRecoilValue, useRecoilState } from 'recoil';
|
||||
import { twitterState } from './state';
|
||||
|
||||
interface IProfile {
|
||||
profile_name?: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useRecoilValue, useRecoilState } from "recoil";
|
||||
import { useRecoilValue, useRecoilState } from 'recoil';
|
||||
|
||||
import { twitterState } from "./state";
|
||||
import { twitterState } from './state';
|
||||
|
||||
export const useTweetStatus = () => {
|
||||
const createTweetLoading = useRecoilValue(twitterState.createTweetLoading);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useRecoilValue } from "recoil";
|
||||
import { twitterState } from "./state";
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { twitterState } from './state';
|
||||
|
||||
export const useTweets = () => {
|
||||
const tweets = useRecoilValue(twitterState.tweets);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { useNuiEvent } from "../../../os/nui-events/hooks/useNuiEvent";
|
||||
import { IMAGE_DELIMITER } from "../utils/images";
|
||||
import { APP_TWITTER } from "../utils/constants";
|
||||
import { twitterState } from "./state";
|
||||
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||
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
|
||||
@@ -67,12 +67,12 @@ export const useTwitterService = () => {
|
||||
setFilteredTweets(tweets.map(processTweet));
|
||||
};
|
||||
|
||||
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, '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);
|
||||
};
|
||||
Reference in new issue
Block a user