UNPKG

@ethora/chat-component

Version:

1. npm create vite@latest 2. select name of project, select type (react/js) 3. cd project-name 4. npm i 5. npm i @ethora/chat-component 6. go to file src/App.tsx and replace it with this code

53 lines (52 loc) 1.28 kB
export interface MainFields { id: string; body: string; roomJID: string; date: Date; key: string; coinsInMessage: number; numberOfReplies: number; } export interface DataFields { photoURL: string; roomJid: string; senderFirstName: string; senderLastName: string; senderWalletAddress: string; senderJID?: string; xmlns?: string; isEdited?: boolean; mucName?: string; push?: boolean; quickReplies?: string[]; isReply?: boolean; showInChannel?: boolean; mainMessage?: string; isSystemMessage?: boolean; tokenAmount?: number; receiverMessageId?: boolean; } export interface FileAttachmentParams { createdAt: Date; fileName: string; imageLocation: string; imagePreview: string; mimeType: string; originalName: string; size: number; duration: number; waveForm: string; attachmentId: string; } export interface NFTAttachmentParams { wrappable: boolean; nftId: string; nftActionType: string; contractAddress: string; } export interface MessageType extends MainFields, DataFields { } export interface FileAttachment extends MainFields, FileAttachmentParams { } export interface NFTAttachment extends MainFields, NFTAttachmentParams { }