added type declarations

master
Edward Shen 2020-11-27 16:12:09 -05:00
parent 5734c9b8fa
commit 14387a5413
Signed by: edward
GPG Key ID: F350507060ED6C90
3 changed files with 6 additions and 11 deletions

View File

@ -2,7 +2,7 @@ import React from "react";
import Navbar from '../../components/navbar';
import Item from "../../components/item";
export default () => (
export default (): JSX.Element => (
<>
<Navbar />
<Item
@ -19,4 +19,4 @@ export default () => (
subtitle="subtitle"
/>
</>
);
);

View File

@ -3,13 +3,8 @@ import Navbar from '../components/navbar';
import { graphql } from "gatsby";
import { MDXRenderer } from 'gatsby-plugin-mdx';
export default ({
data
}) => {
let {
frontmatter,
body
} = data.mdx;
export default ({ data }) => {
const { frontmatter, body } = data.mdx;
return <>
<Navbar />
@ -29,4 +24,4 @@ query NotesIndexQuery($id: String!) {
tableOfContents
body
}
}`;
}`;

View File

@ -8,7 +8,7 @@ import Navbar from "../components/navbar";
import { graphql } from "gatsby";
import style from "./notes.module.css";
export default ({ data, pageContext }) => {
export default ({ data, pageContext }): JSX.Element => {
const posts = data.allMdx.edges;
const { currentPage, numPages, rootPath } = pageContext;
let prevPageLink = null;