diff --git a/app/blog/[slug]/loading.tsx b/app/blog/[slug]/loading.tsx index dcb2cbe..c0fd35d 100644 --- a/app/blog/[slug]/loading.tsx +++ b/app/blog/[slug]/loading.tsx @@ -1,15 +1,22 @@ +const lineWidths = ['78%', '92%', '85%', '88%', '74%', '96%', '82%', '69%']; + export default function BlogPostLoading() { return ( -
-
-
-
-
-
-
- {Array.from({ length: 8 }).map((_, i) => ( -
- ))} +
+
+
+
+
+
+
+
+
+
+ {lineWidths.map((width) => ( +
+ ))} +
+
); diff --git a/app/blog/[slug]/page.tsx b/app/blog/[slug]/page.tsx index c6e747d..35de691 100644 --- a/app/blog/[slug]/page.tsx +++ b/app/blog/[slug]/page.tsx @@ -3,14 +3,12 @@ import { MDXRemote } from 'next-mdx-remote/rsc'; import Link from 'next/link'; import { notFound } from 'next/navigation'; import { format } from 'date-fns'; -import rehypeSlug from 'rehype-slug'; import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import { TableOfContents } from '@/components/mdx/TableOfContents'; import { SideNote } from '@/components/mdx/SideNote'; import { Citation, Bibliography } from '@/components/mdx/Citation'; import { MobileTableOfContents } from '@/components/mdx/MobileTableOfContents'; -// Utility to ensure consistent IDs const slugify = (text: React.ReactNode): string => { if (!text) return ''; const str = typeof text === 'string' ? text : String(text); @@ -21,16 +19,16 @@ const slugify = (text: React.ReactNode): string => { }; const components = { - h1: (props: React.ComponentPropsWithoutRef<'h1'>) =>

, - h2: (props: React.ComponentPropsWithoutRef<'h2'>) =>

, - h3: (props: React.ComponentPropsWithoutRef<'h3'>) =>

, - p: (props: React.ComponentPropsWithoutRef<'p'>) =>

, - ul: (props: React.ComponentPropsWithoutRef<'ul'>) =>