Skip to content

Commit f7819c9

Browse files
committed
remove enum
1 parent c634b8b commit f7819c9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

dotcom-rendering/src/types/hostedContent.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import type { FEHostedContent } from '../frontend/feHostedContent';
22

3-
enum HostedContentType {
4-
Article,
5-
Video,
6-
Gallery,
7-
}
3+
type HostedContentType = 'article' | 'video' | 'gallery';
84

95
export type HostedContent = {
106
frontendData: FEHostedContent;
@@ -14,12 +10,12 @@ export type HostedContent = {
1410
export const enhanceHostedContentType = (
1511
data: FEHostedContent,
1612
): HostedContent => {
17-
let type = HostedContentType.Article;
13+
let type: HostedContentType = 'article';
1814

1915
if (data.video) {
20-
type = HostedContentType.Video;
16+
type = 'video';
2117
} else if (data.images.length) {
22-
type = HostedContentType.Gallery;
18+
type = 'gallery';
2319
}
2420

2521
return {

0 commit comments

Comments
 (0)