From f39e06508e0d3275f3f89fc1b4a40de93c51fe2f Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 24 Jan 2023 09:48:50 +0300 Subject: [PATCH] Update getAssetType() --- utils/getAssetType.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/getAssetType.ts b/utils/getAssetType.ts index 6916cb8..f99c534 100644 --- a/utils/getAssetType.ts +++ b/utils/getAssetType.ts @@ -1,6 +1,6 @@ /* eslint-disable eslint-comments/disable-enable-pair */ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ -export type AssetType = 'image' | 'audio' | 'video' | 'unknown' +export type AssetType = 'image' | 'audio' | 'video' | 'html' | 'unknown' export const getAssetType = (assetFileName: string): AssetType => { const assetType = assetFileName?.split('.').pop() || 'unknown' @@ -8,5 +8,6 @@ export const getAssetType = (assetFileName: string): AssetType => { return 'image' if (assetType === 'mp3' || assetType === 'wav') return 'audio' if (assetType === 'mp4') return 'video' + if (assetType === 'html') return 'html' return 'unknown' }