1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 15:06:36 -04:00

clean up note types

This commit is contained in:
2022-04-30 18:01:33 -04:00
parent a2921d106e
commit d718555001
10 changed files with 49 additions and 39 deletions

View File

@ -10,9 +10,9 @@ import { getNote, getNoteSlugs } from "../../lib/helpers/parse-notes";
import * as config from "../../lib/config";
import { articleJsonLd } from "../../lib/config/seo";
import type { GetStaticProps, GetStaticPaths } from "next";
import type { NoteType } from "../../types";
import type { Note, NoteFrontMatter } from "../../types";
const Note = ({ frontMatter, source }: NoteType) => {
const Note = ({ frontMatter, source }: Note) => {
return (
<>
<NextSeo
@ -74,7 +74,7 @@ const Note = ({ frontMatter, source }: NoteType) => {
);
};
export const getStaticProps: GetStaticProps = async ({ params }: { params: Pick<NoteType["frontMatter"], "slug"> }) => {
export const getStaticProps: GetStaticProps = async ({ params }: { params: Pick<NoteFrontMatter, "slug"> }) => {
const { frontMatter, source } = await getNote(params.slug);
return {