feat: add guilds and channels CRUD (#14)

This commit is contained in:
Divlo
2022-03-05 18:22:30 +01:00
committed by GitHub
parent 9f56a10305
commit 780788d682
50 changed files with 6459 additions and 9039 deletions

View File

@ -8,6 +8,13 @@ import { MessageWithMember } from '../../../../../models/Message'
import { Loader } from '../../../../design/Loader'
import { FileIcon } from './FileIcon'
const supportedImageMimetype = [
'image/png',
'image/jpg',
'image/jpeg',
'image/gif'
]
export interface FileData {
blob: Blob
url: string
@ -44,7 +51,7 @@ export const MessageFile: React.FC<MessageContentProps> = (props) => {
if (file == null) {
return <Loader />
}
if (message.mimetype.startsWith('image/')) {
if (supportedImageMimetype.includes(message.mimetype)) {
return (
<a href={file.url} target='_blank' rel='noreferrer'>
<img