mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-13 23:55:35 -04:00
start extracting types to shared .d.ts file
This commit is contained in:
@@ -95,8 +95,10 @@ const getSiteStats = async (client) => {
|
||||
pages,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
pages.map((page: any) => {
|
||||
// match URLs from RSS feed with db to populate some metadata
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const match: any = notes.find((note) => `notes/${note.slug}` === page.slug);
|
||||
if (match) {
|
||||
page.title = match.title;
|
||||
|
@@ -2,16 +2,16 @@ import Link from "next/link";
|
||||
import isAbsoluteUrl from "is-absolute-url";
|
||||
import hexRgb from "hex-rgb";
|
||||
import { WaveIcon, LockIcon } from "../components/icons";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
type ColorLinkProps = {
|
||||
children: unknown;
|
||||
children: ReactNode;
|
||||
href: string;
|
||||
lightColor: string;
|
||||
darkColor: string;
|
||||
title?: string;
|
||||
external?: boolean;
|
||||
};
|
||||
|
||||
const ColorLink = ({ href, title, lightColor, darkColor, external = false, children }: ColorLinkProps) => {
|
||||
external = external || isAbsoluteUrl(href);
|
||||
|
||||
|
@@ -11,10 +11,11 @@ import CustomCode from "../../components/embeds/Code";
|
||||
import { getNote, getNoteSlugs } from "../../lib/parse-notes";
|
||||
import * as config from "../../lib/config";
|
||||
import type { GetStaticProps, GetStaticPaths } from "next";
|
||||
import type { NoteType } from "../../types";
|
||||
|
||||
const Comments = dynamic(() => import("../../components/notes/Comments"), { ssr: false });
|
||||
|
||||
const Note = ({ frontMatter, mdxSource }) => {
|
||||
const Note = ({ frontMatter, mdxSource }: NoteType) => {
|
||||
const customComponents = {
|
||||
a: CustomLink,
|
||||
code: CustomCode,
|
||||
|
Reference in New Issue
Block a user