about summary refs log tree commit diff
path: root/app/javascript/mastodon/selectors/index.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-06-27 09:30:15 +0200
committerGitHub <noreply@github.com>2022-06-27 09:30:15 +0200
commit2936f42a14cfdca70d4a9653dab29382315945e7 (patch)
tree182a6660f1d8304ad893582732fb85db00e250aa /app/javascript/mastodon/selectors/index.js
parent602f291da9f4fa157233b29dc6ac96e784203c98 (diff)
Add notifications for new reports (#18697)
Diffstat (limited to 'app/javascript/mastodon/selectors/index.js')
-rw-r--r--app/javascript/mastodon/selectors/index.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/javascript/mastodon/selectors/index.js b/app/javascript/mastodon/selectors/index.js
index 3121774b3..fbd25b605 100644
--- a/app/javascript/mastodon/selectors/index.js
+++ b/app/javascript/mastodon/selectors/index.js
@@ -152,14 +152,15 @@ export const getAlerts = createSelector([getAlertsBase], (base) => {
   return arr;
 });
 
-export const makeGetNotification = () => {
-  return createSelector([
-    (_, base)             => base,
-    (state, _, accountId) => state.getIn(['accounts', accountId]),
-  ], (base, account) => {
-    return base.set('account', account);
-  });
-};
+export const makeGetNotification = () => createSelector([
+  (_, base)             => base,
+  (state, _, accountId) => state.getIn(['accounts', accountId]),
+], (base, account) => base.set('account', account));
+
+export const makeGetReport = () => createSelector([
+  (_, base) => base,
+  (state, _, targetAccountId) => state.getIn(['accounts', targetAccountId]),
+], (base, targetAccount) => base.set('target_account', targetAccount));
 
 export const getAccountGallery = createSelector([
   (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),