mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-07-13 16:43:53 +01:00
18 lines
609 B
TypeScript
18 lines
609 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { createSelector } from 'reselect';
|
|
import type { StateType } from '../reducer.preload.ts';
|
|
import type { EmojisStateType } from '../ducks/emojis.preload.ts';
|
|
import type { StateSelector } from '../types.std.ts';
|
|
import type { Emoji } from '../../axo/emoji.std.ts';
|
|
|
|
function selectEmojisState(state: StateType): EmojisStateType {
|
|
return state.emojis;
|
|
}
|
|
|
|
export const selectRecentEmojis: StateSelector<ReadonlyArray<Emoji.Parent>> =
|
|
createSelector(selectEmojisState, state => {
|
|
return state.recentEmojis;
|
|
});
|