File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
dotcom-rendering/src/types Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 11import type { FEHostedContent } from '../frontend/feHostedContent' ;
22
3- enum HostedContentType {
4- Article ,
5- Video ,
6- Gallery ,
7- }
3+ type HostedContentType = 'article' | 'video' | 'gallery' ;
84
95export type HostedContent = {
106 frontendData : FEHostedContent ;
@@ -14,12 +10,12 @@ export type HostedContent = {
1410export 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 {
You can’t perform that action at this time.
0 commit comments