Last active
December 16, 2019 14:28
-
-
Save borlaym/f87a63f950bfa11fc12e792ce58e5812 to your computer and use it in GitHub Desktop.
Final type of data structure for curated front page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type SideHeader = { | |
type: 'SideHeader', | |
title: string, | |
useLogo? : boolean, | |
description? : string, | |
customImage: SimpleImage, | |
links: Array <{ | |
url: string, | |
text: string | |
}> | |
} | |
type TopHeader = { | |
type: 'TopHeader', | |
title: string, | |
useLogo? : boolean, | |
links? : Array <{ | |
url: string, | |
text: string | |
}> | |
} | |
type FourEqualWithSidebar = { | |
name: 'FourEqualWithSidebar', | |
header: SideHeader | |
} | |
type Feed = { | |
name: 'Feed', | |
header: TopHeader, | |
numberOfCards: number | |
}; | |
type CurationBlockLayout = FourEqualWithSidebar | Feed; | |
type Autofill = { | |
type: 'BlogAutofill', | |
blogId: BlogId | |
} | { | |
type: 'TagAutofill', | |
tagCanonical: string, | |
blogId: BlogId | |
} | { | |
type: 'StoryTypeAutofill', | |
storyTypeId: StoryTypeId, | |
} | { | |
type: 'CategoryAutofill', | |
categoryId: CategoryId | |
} | |
type StandardBlock = { | |
type: 'Standard', | |
layout: CurationBlockLayout, | |
autofill? : Autofill, | |
cards: Array <{ | |
postId: PostId | |
}> | |
} | |
type VideoBlock = { | |
type: 'Video' | |
} | |
type CurationBlock = StandardBlock | VideoBlock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The MVP layouts are: