import Image from 'next/image' import Link from 'next/link' import date from 'date-and-time' import { MessageWithMember } from '../../../../models/Message' import { API_URL } from '../../../../tools/api' import { MessageText } from './MessageText' import { Loader } from '../../../design/Loader' import { MessageFile } from './MessageFile' export interface MessageProps { message: MessageWithMember } export const Message: React.FC = (props) => { const { message } = props return (
{"Users's
{message.member.user.name} {date.format(new Date(message.createdAt), 'DD/MM/YYYY - HH:mm:ss')}
{message.type === 'text' ? ( ) : message.type === 'file' ? ( ) : ( )}
) }