mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 17:06:37 -04:00
consistent arrow functions
This commit is contained in:
@ -3,7 +3,9 @@ import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./Blockquote.module.css";
|
||||
|
||||
const Blockquote = ({ className, ...rest }: ComponentPropsWithoutRef<"blockquote">) => (
|
||||
export type BlockquoteProps = ComponentPropsWithoutRef<"blockquote">;
|
||||
|
||||
const Blockquote = ({ className, ...rest }: BlockquoteProps) => (
|
||||
<blockquote className={clsx(styles.blockquote, className)} {...rest} />
|
||||
);
|
||||
|
||||
|
@ -3,7 +3,9 @@ import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./CodeInline.module.css";
|
||||
|
||||
const CodeInline = ({ className, ...rest }: ComponentPropsWithoutRef<"code">) => (
|
||||
export type CodeInlineProps = ComponentPropsWithoutRef<"code">;
|
||||
|
||||
const CodeInline = ({ className, ...rest }: CodeInlineProps) => (
|
||||
<code className={clsx(styles.codeInline, className)} {...rest} />
|
||||
);
|
||||
|
||||
|
@ -22,9 +22,7 @@ const CodePen = ({
|
||||
preview: `${!!preview}`,
|
||||
editable: `${!!editable}`,
|
||||
})}`}
|
||||
scrolling="no"
|
||||
sandbox="allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation"
|
||||
style={{ height: `${height}px`, width: "100%", border: "0" }}
|
||||
style={{ height: `${height}px`, width: "100%", border: "0", overflow: "hidden" }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import Giscus from "@giscus/react";
|
||||
import config from "../../lib/config/constants";
|
||||
import config from "../../lib/config";
|
||||
import type { GiscusProps } from "@giscus/react";
|
||||
|
||||
export type CommentsProps = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import clsx from "clsx";
|
||||
import { HeartIcon } from "lucide-react";
|
||||
import Link from "../Link";
|
||||
import config from "../../lib/config/constants";
|
||||
import config from "../../lib/config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./Footer.module.css";
|
||||
@ -47,7 +47,7 @@ const Footer = ({ className, ...rest }: FooterProps) => {
|
||||
width="1.25em"
|
||||
className={styles.icon}
|
||||
>
|
||||
<path d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"></path>
|
||||
<path d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z" />
|
||||
</svg>
|
||||
</Link>
|
||||
.{" "}
|
||||
|
@ -12,7 +12,7 @@ const Gist = async ({ id, file }: GistProps) => {
|
||||
const scriptResponse = await fetch(scriptUrl);
|
||||
|
||||
if (!scriptResponse.ok) {
|
||||
console.warn(`[gist] fetching js for https://gist.github.com/${id} failed:`, scriptResponse.statusText);
|
||||
console.warn(`[gist] failed to fetch js:`, scriptResponse.statusText);
|
||||
|
||||
return (
|
||||
<p style={{ textAlign: "center" }}>
|
||||
@ -33,10 +33,9 @@ const Gist = async ({ id, file }: GistProps) => {
|
||||
scrolling="no"
|
||||
id={iframeId}
|
||||
srcDoc={iframeHtml}
|
||||
sandbox="allow-same-origin allow-scripts allow-popups allow-top-navigation-by-user-activation"
|
||||
style={{ border: "0", overflow: "hidden" }}
|
||||
suppressHydrationWarning
|
||||
></iframe>
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@ import clsx from "clsx";
|
||||
import Link from "../Link";
|
||||
import Image from "../Image";
|
||||
import Menu from "../Menu";
|
||||
import config from "../../lib/config/constants";
|
||||
import config from "../../lib/config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./Header.module.css";
|
||||
|
@ -3,7 +3,9 @@ import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./HorizontalRule.module.css";
|
||||
|
||||
const HorizontalRule = ({ className, ...rest }: ComponentPropsWithoutRef<"hr">) => (
|
||||
export type HorizontalRuleProps = ComponentPropsWithoutRef<"hr">;
|
||||
|
||||
const HorizontalRule = ({ className, ...rest }: HorizontalRuleProps) => (
|
||||
<hr className={clsx(styles.hr, className)} {...rest} />
|
||||
);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import NextLink from "next/link";
|
||||
import clsx from "clsx";
|
||||
import objStr from "obj-str";
|
||||
import config from "../../lib/config/constants";
|
||||
import config from "../../lib/config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
import styles from "./Link.module.css";
|
||||
|
Reference in New Issue
Block a user