verdnatura-chat/app/containers/markdown/new/MarkdownContext.ts

30 lines
573 B
TypeScript
Raw Normal View History

2021-10-28 17:48:53 +00:00
import React from 'react';
import { UserMention } from '../../message/interfaces';
interface IMarkdownContext {
mentions: UserMention[];
channels: {
name: string;
_id: number;
}[];
useRealName: boolean;
username: string;
baseUrl: string;
navToRoomInfo: Function;
getCustomEmoji?: Function;
onLinkPress?: Function;
}
const defaultState = {
mentions: [],
channels: [],
useRealName: false,
username: '',
baseUrl: '',
navToRoomInfo: () => {}
};
const MarkdownContext = React.createContext<IMarkdownContext>(defaultState);
export default MarkdownContext;