1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-05-23 23:19:37 +02:00
parent 61459cd2d2
commit f8366bb777
5 changed files with 75 additions and 90 deletions

View File

@ -27,4 +27,15 @@ type ContextType = {
}
const EmojisContext = createContext<ContextType>({} as ContextType)
export const emojisReducer = (state: EmojisState, action: EmojisAction) => {
switch (action.type) {
case 'activate':
return { ...state, active: action.payload }
case 'load':
return { ...state, emojis: action.payload }
case 'shortcode':
return { ...state, shortcode: action.payload }
}
}
export default EmojisContext