tooot/src/components/Timeline/Shared/Context.tsx

28 lines
784 B
TypeScript
Raw Normal View History

2022-12-03 20:47:11 +01:00
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { createContext } from 'react'
2022-12-18 17:25:18 +01:00
export type HighlightedStatusContextType = {}
type StatusContextType = {
2022-12-03 20:47:11 +01:00
queryKey?: QueryKeyTimeline
status?: Mastodon.Status
isMyAccount?: boolean
2022-12-03 20:47:11 +01:00
spoilerHidden?: boolean
2022-12-18 17:25:18 +01:00
rawContent?: React.MutableRefObject<string[]> // When highlighted, for translate, edit history
2022-12-17 23:21:56 +01:00
detectedLanguage?: React.MutableRefObject<string>
2022-12-31 02:06:19 +01:00
excludeMentions?: React.MutableRefObject<Mastodon.Mention[]>
2022-12-03 20:47:11 +01:00
highlighted?: boolean
suppressSpoiler?: boolean
2022-12-11 01:46:14 +01:00
inThread?: boolean
2022-12-03 20:47:11 +01:00
disableDetails?: boolean
disableOnPress?: boolean
2022-12-16 00:21:53 +01:00
isConversation?: boolean
isRemote?: boolean
2022-12-03 20:47:11 +01:00
}
2022-12-18 17:25:18 +01:00
const StatusContext = createContext<StatusContextType>({} as StatusContextType)
2022-12-03 20:47:11 +01:00
export default StatusContext