about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/selectors
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-06-29 18:27:34 +0200
committerGitHub <noreply@github.com>2022-06-29 18:27:34 +0200
commit54ed35f57c55fff639c8192b99fc60ab69c54f06 (patch)
tree78cee27bfe871569f3ae2e7aa62d847fe9df7046 /app/javascript/flavours/glitch/selectors
parent63f79874b59b3ba28c0f940b9d36ea7aacb44c93 (diff)
parent485b43ed7e312ab2c3bad446132c57d6a0ce7de4 (diff)
Merge pull request #1801 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/selectors')
-rw-r--r--app/javascript/flavours/glitch/selectors/index.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js
index 99afe5355..d9aa8f140 100644
--- a/app/javascript/flavours/glitch/selectors/index.js
+++ b/app/javascript/flavours/glitch/selectors/index.js
@@ -171,14 +171,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()),