diff --git a/src/app/projects/page.tsx b/src/app/projects/page.tsx
index a3c133f..882b23f 100644
--- a/src/app/projects/page.tsx
+++ b/src/app/projects/page.tsx
@@ -1,11 +1,21 @@
+'use client';
+
+import { useEffect, useState } from "react";
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "~/components/ui/card";
import { Badge } from "~/components/ui/badge";
import Link from "next/link";
-import { ArrowUpRight, Sparkles } from "lucide-react";
+import { ArrowUpRight } from "lucide-react";
import { projects } from "~/lib/data";
import Image from "next/image";
+import { CardSkeleton } from "~/components/ui/skeletons";
export default function ProjectsPage() {
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ setLoading(false);
+ }, []);
+
return (
@@ -17,57 +27,65 @@ export default function ProjectsPage() {
- {projects.map((project, index) => (
-
-
-
-
-
-
{project.title}
- {project.link && (
-
-
-
- )}
-
- {project.description}
-
-
-
- {project.longDescription}
-
-
- {project.tags.map((tag) => (
-
- {tag}
-
- ))}
-
-
-
-
- {project.image && (
-
-
-
-
+ {loading ? (
+ <>
+
+
+
+ >
+ ) : (
+ projects.map((project, index) => (
+
+
+
+
+
+
{project.title}
+ {project.link && (
+
+
+
+ )}
+
+ {project.description}
+
+
+
+ {project.longDescription}
+
+
+ {project.tags.map((tag) => (
+
+ {tag}
+
+ ))}
+
+
- )}
-
-
- ))}
+
+ {project.image && (
+
+ )}
+
+
+ ))
+ )}
);
diff --git a/src/app/publications/page.tsx b/src/app/publications/page.tsx
index ccc43d0..028f4f9 100644
--- a/src/app/publications/page.tsx
+++ b/src/app/publications/page.tsx
@@ -6,6 +6,7 @@ import { useEffect, useState } from "react";
import { Badge } from "~/components/ui/badge";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "~/components/ui/card";
import { Skeleton } from "~/components/ui/skeleton";
+import { CardSkeleton } from "~/components/ui/skeletons";
import type { Publication } from "~/lib/bibtex";
import { parseBibtex } from "~/lib/bibtex";
@@ -67,15 +68,11 @@ export default function PublicationsPage() {
{loading ? (
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+ >
) : (
publications.map((pub, index) => (
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx
index 5fce61f..986d898 100644
--- a/src/components/Navigation.tsx
+++ b/src/components/Navigation.tsx
@@ -4,7 +4,7 @@ import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { useTheme } from 'next-themes';
import { useState, useEffect } from 'react';
-import { Home, FolderGit2, FileText, BookOpenText, Menu, X, Sun, Moon } from 'lucide-react';
+import { Home, FolderGit2, FileText, BookOpenText, Menu, X, Sun, Moon, SunMoon } from 'lucide-react';
// Define the nav items without icons
const navItems = [
@@ -25,6 +25,10 @@ export function Navigation() {
setMounted(true);
}, []);
+ // Determine the icon to show based on the theme
+ const themeIcon = theme === 'dark' ? : ;
+ const defaultThemeIcon = ; // Default icon for server-side rendering
+
return (
<>
{/* Backdrop overlay - faster fade */}
@@ -44,15 +48,14 @@ export function Navigation() {
Sean O'Connor
- {mounted && (
-
- )}
+ {/* Render the theme icon as a placeholder */}
+
diff --git a/src/components/ui/skeletons.tsx b/src/components/ui/skeletons.tsx
new file mode 100644
index 0000000..4aefcfb
--- /dev/null
+++ b/src/components/ui/skeletons.tsx
@@ -0,0 +1,40 @@
+import { Card, CardContent, CardHeader } from "./card";
+import { Skeleton } from "./skeleton";
+
+export function CardSkeleton() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export function AboutCardSkeleton() {
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file