Restore ability to message someone from embedded contact

This commit is contained in:
Scott Nonnenberg 2022-04-11 17:26:09 -07:00 committed by GitHub
parent f77175f6b3
commit 302604f67e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 311 additions and 236 deletions

View file

@ -5,20 +5,23 @@ import { createSelector } from 'reselect';
import type { StateType } from '../reducer';
import type { AccountsStateType } from '../ducks/accounts';
import type { UUIDStringType } from '../../types/UUID';
export const getAccounts = (state: StateType): AccountsStateType =>
state.accounts;
export type AccountSelectorType = (identifier?: string) => boolean;
export type AccountSelectorType = (
identifier?: string
) => UUIDStringType | undefined;
export const getAccountSelector = createSelector(
getAccounts,
(accounts: AccountsStateType): AccountSelectorType => {
return (identifier?: string) => {
if (!identifier) {
return false;
return undefined;
}
return accounts.accounts[identifier] || false;
return accounts.accounts[identifier] || undefined;
};
}
);