1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Removed autolinker

This commit is contained in:
xmflsct
2022-09-20 22:23:01 +02:00
parent fb3cfa0db1
commit 7ec7f85893
70 changed files with 253 additions and 7171 deletions

View File

@ -10,18 +10,21 @@ type inputProps = {
addFunc?: (add: string) => void // For none default state update
}
export type Emojis = MutableRefObject<
| {
title: string
data: Pick<Mastodon.Emoji, 'shortcode' | 'url' | 'static_url'>[][]
type?: 'frequent'
}[]
| null
>
export type EmojisState = {
emojis: {
title: string
data: Pick<Mastodon.Emoji, 'shortcode' | 'url' | 'static_url'>[][]
type?: 'frequent'
}[]
inputProps: inputProps[]
targetIndex: number
}
export type EmojisAction =
| { type: 'load'; payload: NonNullable<EmojisState['emojis']> }
| { type: 'input'; payload: EmojisState['inputProps'] }
| { type: 'target'; payload: EmojisState['targetIndex'] }
@ -33,8 +36,6 @@ const EmojisContext = createContext<ContextType>({} as ContextType)
export const emojisReducer = (state: EmojisState, action: EmojisAction) => {
switch (action.type) {
case 'load':
return { ...state, emojis: action.payload }
case 'input':
return { ...state, inputProps: action.payload }
case 'target':