1414 */
1515
1616module Link = Next .Link
17+ open RescriptCore
1718
1819let defaultPreviewImg = "/static/Art-3-rescript-launch.jpg"
1920
2021// For encoding reasons, see https://shripadk.github.io/react/docs/jsx-gotchas.html
21- let middleDotSpacer = " " ++ (Js . String .fromCharCode (183 ) ++ " " )
22+ let middleDotSpacer = " " ++ (String .fromCharCode (183 ) ++ " " )
2223
2324module Badge = {
2425 @react.component
@@ -79,7 +80,7 @@ module BlogCard = {
7980 ~author as _ : BlogFrontmatter .author ,
8081 ~category : option <string >= ?,
8182 ~badge : option <BlogFrontmatter .Badge .t >= ?,
82- ~date : Js . Date .t ,
83+ ~date : Date .t ,
8384 ~slug : string ,
8485 ) =>
8586 <section className = "h-full" >
@@ -127,7 +128,7 @@ module FeatureCard = {
127128 ~title : string = "Unknown Title" ,
128129 ~author : BlogFrontmatter .author ,
129130 ~badge : option <BlogFrontmatter .Badge .t >= ?,
130- ~date : Js . Date .t ,
131+ ~date : Date .t ,
131132 ~category : option <string >= ?,
132133 ~firstParagraph : string = "" ,
133134 ~slug : string ,
@@ -204,7 +205,7 @@ type props = {posts: array<BlogApi.post>, category: category}
204205let default = (props : props ): React .element => {
205206 let {posts , category } = props
206207
207- let content = if Belt . Array .length (posts ) === 0 {
208+ let content = if Array .length (posts ) === 0 {
208209 /* <div> {React.string("Currently no posts available")} </div>; */
209210 <div className = "mt-8" >
210211 <Markdown .H1 > {React .string ("Blog not yet available" )} </Markdown .H1 >
@@ -220,11 +221,11 @@ let default = (props: props): React.element => {
220221 let featureBox =
221222 <div className = "w-full mb-24 lg:px-8 xl:px-0" >
222223 <FeatureCard
223- previewImg = ?{first .frontmatter .previewImg -> Js . Null .toOption }
224+ previewImg = ?{first .frontmatter .previewImg -> Null .toOption }
224225 title = first .frontmatter .title
225- badge = ?{first .frontmatter .badge -> Js . Null .toOption }
226+ badge = ?{first .frontmatter .badge -> Null .toOption }
226227 author = first .frontmatter .author
227- firstParagraph = ?{first .frontmatter .description -> Js . Null .toOption }
228+ firstParagraph = ?{first .frontmatter .description -> Null .toOption }
228229 date = {first .frontmatter .date -> DateStr .toDate }
229230 slug = {BlogApi .blogPathToSlug (first .path )}
230231 />
@@ -236,11 +237,11 @@ let default = (props: props): React.element => {
236237 <div
237238 className = "px-4 md:px-8 xl:px-0 grid grid-cols-1 xs:grid-cols-2 md:grid-cols-3 gap-20 gap-y-12 md:gap-y-24 w-full" >
238239 {Js .Array2 .map (rest , post => {
239- let badge = post .frontmatter .badge -> Js . Null .toOption
240+ let badge = post .frontmatter .badge -> Null .toOption
240241
241242 <BlogCard
242243 key = {post .path }
243- previewImg = ?{post .frontmatter .previewImg -> Js . Null .toOption }
244+ previewImg = ?{post .frontmatter .previewImg -> Null .toOption }
244245 title = post .frontmatter .title
245246 author = post .frontmatter .author
246247 ?badge
0 commit comments