bigbuffet-rw/app/soapbox/actions/emojis.ts

22 lines
393 B
TypeScript
Raw Normal View History

import { saveSettings } from './settings';
2022-11-15 08:11:42 -08:00
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,
};