import { Avatar, Col, Row } from 'antd'; import dynamic from 'next/dynamic'; import React, { FC } from 'react'; import cn from 'classnames'; import { ChatSocialMessage as ChatMessage } from '../../../interfaces/chat-social-message.model'; import styles from './ChatSocialMessage.module.scss'; const FollowIcon = dynamic(() => import('./follow.svg')); const LikeIcon = dynamic(() => import('./like.svg')); const RepostIcon = dynamic(() => import('./repost.svg')); export interface ChatSocialMessageProps { message: ChatMessage; } export const ChatSocialMessage: FC = ({ message }) => { const { body, title, image, link, type } = message; let Icon; switch (type.toString()) { case 'follow': Icon = FollowIcon; break; case 'like': Icon = LikeIcon; break; case 'repost': Icon = RepostIcon; break; default: break; } return (
Logo {title} {body}
); };