bigbuffet-rw/app/soapbox/actions/emojis.ts
2022-11-15 11:11:42 -05:00

21 lines
393 B
TypeScript

import { saveSettings } from './settings';
import type { Emoji } from 'soapbox/components/autosuggest-emoji';
import type { AppDispatch } from 'soapbox/store';
const EMOJI_USE = 'EMOJI_USE';
const useEmoji = (emoji: Emoji) =>
(dispatch: AppDispatch) => {
dispatch({
type: EMOJI_USE,
emoji,
});
dispatch(saveSettings());
};
export {
EMOJI_USE,
useEmoji,
};