From 9faf730e829e83a9bda99074b6fd17dd3f08d827 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 10 Jan 2023 21:49:23 +0800 Subject: [PATCH] Handle accept/reject follow requests for locked accounts --- src/pages/notifications.jsx | 106 +++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 25 deletions(-) diff --git a/src/pages/notifications.jsx b/src/pages/notifications.jsx index d99bdde0..738f6971 100644 --- a/src/pages/notifications.jsx +++ b/src/pages/notifications.jsx @@ -85,32 +85,42 @@ function Notification({ notification }) {
{type !== 'mention' && ( -

- {!/poll|update/i.test(type) && ( - <> - {_accounts?.length > 1 ? ( - <> - {_accounts.length} people{' '} - - ) : ( - <> - {' '} - - )} - + <> +

+ {!/poll|update/i.test(type) && ( + <> + {_accounts?.length > 1 ? ( + <> + {_accounts.length} people{' '} + + ) : ( + <> + {' '} + + )} + + )} + {text} + {type === 'mention' && ( + + {' '} + •{' '} + + + )} +

+ {type === 'follow_request' && ( + { + loadNotifications(true); + }} + /> )} - {text} - {type === 'mention' && ( - - {' '} - •{' '} - - - )} -

+ )} {_accounts?.length > 1 && (

@@ -414,4 +424,50 @@ function Notifications() { ); } +function FollowRequestButtons({ accountID, onChange }) { + const [uiState, setUIState] = useState('default'); + return ( +

+ {' '} + +

+ ); +} + export default memo(Notifications);