mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -3,7 +3,7 @@ import { twitterState } from './state';
|
||||
|
||||
export const useModal = () => {
|
||||
const [modalVisible, setModalVisible] = useRecoilState(
|
||||
twitterState.showCreateTweetModal
|
||||
twitterState.showCreateTweetModal,
|
||||
);
|
||||
const [message, setMessage] = useRecoilState(twitterState.modalMessage);
|
||||
return { modalVisible, setModalVisible, message, setMessage };
|
||||
|
||||
@@ -18,11 +18,9 @@ interface IUseProfile {
|
||||
|
||||
export const useProfile = (): IUseProfile => {
|
||||
const profile = useRecoilValue(twitterState.profile);
|
||||
const updateProfileLoading = useRecoilValue(
|
||||
twitterState.updateProfileLoading
|
||||
);
|
||||
const updateProfileLoading = useRecoilValue(twitterState.updateProfileLoading);
|
||||
const [updateProfileSuccessful, setUpdateProfileSuccessful] = useRecoilState(
|
||||
twitterState.updateProfileSuccess
|
||||
twitterState.updateProfileSuccess,
|
||||
);
|
||||
return {
|
||||
profile,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { twitterState } from './state';
|
||||
export const useTweetStatus = () => {
|
||||
const createTweetLoading = useRecoilValue(twitterState.createTweetLoading);
|
||||
const [createTweetSuccessful, setCreateTweetSuccessful] = useRecoilState(
|
||||
twitterState.createTweetSuccessful
|
||||
twitterState.createTweetSuccessful,
|
||||
);
|
||||
return {
|
||||
createTweetLoading,
|
||||
|
||||
@@ -14,9 +14,7 @@ export const useTwitterNotifications = () => {
|
||||
|
||||
const { icon, notificationIcon } = useApp('TWITTER');
|
||||
|
||||
const [unreadCount, setUnreadCount] = useRecoilState(
|
||||
twitterState.unreadTweetsCount
|
||||
);
|
||||
const [unreadCount, setUnreadCount] = useRecoilState(twitterState.unreadTweetsCount);
|
||||
|
||||
const setNotification = useCallback(
|
||||
({ profile_name, message }) => {
|
||||
@@ -38,12 +36,12 @@ export const useTwitterNotifications = () => {
|
||||
count: unread,
|
||||
}),
|
||||
content: null,
|
||||
}
|
||||
},
|
||||
);
|
||||
return unread;
|
||||
});
|
||||
},
|
||||
[setUnreadCount, addNotificationAlert, t, icon, notificationIcon, history]
|
||||
[setUnreadCount, addNotificationAlert, t, icon, notificationIcon, history],
|
||||
);
|
||||
|
||||
return { setNotification, setUnreadCount, unreadCount };
|
||||
|
||||
@@ -34,9 +34,7 @@ export const useTwitterService = () => {
|
||||
const { setNotification } = useTwitterNotifications();
|
||||
|
||||
const setProfile = useSetRecoilState(twitterState.profile);
|
||||
const setUpdateProfileLoading = useSetRecoilState(
|
||||
twitterState.updateProfileLoading
|
||||
);
|
||||
const setUpdateProfileLoading = useSetRecoilState(twitterState.updateProfileLoading);
|
||||
|
||||
const setTweets = useSetRecoilState(twitterState.tweets);
|
||||
const setFilteredTweets = useSetRecoilState(twitterState.filteredTweets);
|
||||
|
||||
Reference in new issue
Block a user