refactor .js files to ES modules where possible

This commit is contained in:
2024-03-12 14:58:00 -04:00
parent e66dc37c41
commit e1a26d5257
28 changed files with 460 additions and 414 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import Link from "../Link";
import Image from "../Image";
import { styled, theme } from "../../lib/styles/stitches.config";
import { authorName } from "../../lib/config";
import config from "../../lib/config";
import type { ComponentPropsWithoutRef } from "react";
import selfieJpg from "../../public/static/images/selfie.jpg";
@@ -52,10 +52,10 @@ export type SelfieProps = Omit<ComponentPropsWithoutRef<typeof Link>, "href">;
const Selfie = ({ ...rest }: SelfieProps) => {
return (
<SelfieLink href="/" rel="author" title={authorName} underline={false} {...rest}>
<SelfieLink href="/" rel="author" title={config.authorName} underline={false} {...rest}>
<CircleImage
src={selfieJpg}
alt={`Photo of ${authorName}`}
alt={`Photo of ${config.authorName}`}
width={70}
height={70}
quality={60}
@@ -63,7 +63,7 @@ const Selfie = ({ ...rest }: SelfieProps) => {
inline
priority
/>
<Name>{authorName}</Name>
<Name>{config.authorName}</Name>
</SelfieLink>
);
};