mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-20 19:40:52 -05:00
clean up note types
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { OctocatOcticon } from "../components/Icons";
|
||||
import { styled } from "../lib/styles/stitches.config";
|
||||
import { authorSocial } from "../lib/config";
|
||||
import type { GetStaticProps } from "next";
|
||||
import type { RepositoryType } from "../types";
|
||||
import type { Repository } from "../types";
|
||||
|
||||
const Wrapper = styled("div", {
|
||||
display: "flex",
|
||||
@@ -54,7 +54,7 @@ const Projects = ({ repos }) => (
|
||||
|
||||
<Content>
|
||||
<Wrapper>
|
||||
{repos.map((repo: RepositoryType) => (
|
||||
{repos.map((repo: Repository) => (
|
||||
<Card key={repo.name} {...repo} />
|
||||
))}
|
||||
</Wrapper>
|
||||
@@ -111,7 +111,7 @@ export const getStaticProps: GetStaticProps = async () => {
|
||||
}
|
||||
);
|
||||
|
||||
const repos: RepositoryType[] = user.repositories.edges.map(({ node: repo }) => ({
|
||||
const repos: Repository[] = user.repositories.edges.map(({ node: repo }) => ({
|
||||
name: repo.name,
|
||||
url: repo.url,
|
||||
description: repo.description,
|
||||
|
||||
Reference in New Issue
Block a user