Skip to content
This repository was archived by the owner on May 17, 2020. It is now read-only.

Commit 47e6a43

Browse files
committed
Fix build
1 parent 5fd6f8e commit 47e6a43

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

components/layout.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ import Head from 'next/head'
22
import styles from './layout.module.css'
33
import utilStyles from '../styles/utils.module.css'
44
import Link from 'next/link'
5+
import {ReactNode} from 'react'
56

67
const name = 'Daniel G.'
78
export const siteTitle = 'Next.js Sample Website'
89

9-
export default function Layout({children, home}) {
10+
export default function Layout({
11+
children,
12+
home,
13+
}: {
14+
children: ReactNode
15+
home?: boolean
16+
}) {
1017
return (
1118
<div className={styles.container}>
1219
<Head>

lib/posts.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const postsDirectory = path.join(process.cwd(), 'posts')
99
export function getSortedPostsData() {
1010
// Get file names under /posts
1111
const fileNames = fs.readdirSync(postsDirectory)
12-
const allPostsData = fileNames.map(fileName => {
12+
const allPostsData: {
13+
id: string
14+
date?: string
15+
title?: string
16+
}[] = fileNames.map(fileName => {
1317
// Remove ".md" from file name to get id
1418
const id = fileName.replace(/\.md$/, '')
1519

0 commit comments

Comments
 (0)