refactor: move isGIF method's location

pull/13/head
shikelong 4 years ago
parent 702ff7596e
commit 8a4bec8819

@ -4,7 +4,7 @@ import { showToasts, t } from 'tailchat-shared';
import { Avatar } from 'antd';
import { Icon } from '@iconify/react';
import { ModalAvatarCropper } from './modals/AvatarCropper';
import { isGIF } from '@/utils/filetype-helper';
import { isGIF } from '@/utils/file-helper';
interface AvatarPickerProps {
className?: string;

@ -114,3 +114,12 @@ export async function openFile(
fileEl.click();
});
}
/**
* Judge GIF File type by mime type
* @param file File object
* @returns if passed file object is a gif image.
*/
export const isGIF = (file: File): boolean => {
return file.type === 'image/gif';
};

@ -1,8 +0,0 @@
/**
* Judge GIF File type by mime type
* @param file File object
* @returns if passed file object is a gif image.
*/
export const isGIF = (file: File): boolean => {
return file.type === 'image/gif';
};
Loading…
Cancel
Save