added type declarations

This commit is contained in:
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 Navbar from '../../components/navbar';
import Item from "../../components/item"; import Item from "../../components/item";
export default () => ( export default (): JSX.Element => (
<> <>
<Navbar /> <Navbar />
<Item <Item
@ -19,4 +19,4 @@ export default () => (
subtitle="subtitle" subtitle="subtitle"
/> />
</> </>
); );

View file

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

View file

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