bigbuffet-rw/app/soapbox/actions/emojis.ts
marcin mikołajczak cfacc23f5c Actions: TypeScript
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-15 22:11:36 +02:00

20 lines
327 B
TypeScript

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