feat(footer): wire social links from Navigation global instead of hardcoded values
All checks were successful
ci/woodpecker/push/web Pipeline was successful

Footer is now an async server component that fetches the Navigation
global directly and removed from the barrel export to prevent node:fs
leaking into client bundles. Social entries render from CMS data.
Added force-dynamic to all pages for build compatibility.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 22:14:11 -05:00
parent 7d125fe7d4
commit 85d655fae1
5 changed files with 26 additions and 20 deletions

View File

@@ -1,3 +1,4 @@
export const dynamic = "force-dynamic";
export const metadata = { title: "Resume" };
export default function ResumePage() {

View File

@@ -1,3 +1,5 @@
export const dynamic = "force-dynamic";
import { notFound } from "next/navigation";
type Params = { slug: string };

View File

@@ -1,3 +1,4 @@
export const dynamic = "force-dynamic";
export const metadata = { title: "Writing" };
export default function WritingIndexPage() {

View File

@@ -1,4 +1,6 @@
import Link from "next/link";
import { getPayload } from "payload";
import config from "@payload-config";
import { StatusTerminal } from "./StatusTerminal";
const NAV_LINKS = [
@@ -8,12 +10,11 @@ const NAV_LINKS = [
{ label: "Contact", href: "/contact" },
];
const SOCIALS = [
{ label: "GitHub", href: "https://github.com/jasonwoltje" },
{ label: "LinkedIn", href: "https://linkedin.com/in/jasonwoltje" },
];
export async function Footer() {
const payload = await getPayload({ config });
const nav = await payload.findGlobal({ slug: "navigation", depth: 0 });
const socials = nav.socials ?? [];
export function Footer() {
return (
<footer className="bg-background">
<div className="mx-auto max-w-7xl px-6 pt-16 pb-8">
@@ -48,20 +49,22 @@ export function Footer() {
</div>
{/* Socials */}
<div className="flex flex-col gap-3">
<span className="label-md text-on-surface-variant mb-1">Connect</span>
{SOCIALS.map((s) => (
<a
key={s.href}
href={s.href}
target="_blank"
rel="noopener noreferrer"
className="font-label text-[11px] uppercase tracking-widest text-on-surface-variant transition-colors hover:text-secondary"
>
{s.label}
</a>
))}
</div>
{socials.length > 0 && (
<div className="flex flex-col gap-3">
<span className="label-md text-on-surface-variant mb-1">Connect</span>
{socials.map((s) => (
<a
key={s.id ?? s.href}
href={s.href}
target="_blank"
rel="noopener noreferrer"
className="font-label text-[11px] uppercase tracking-widest text-on-surface-variant transition-colors hover:text-secondary"
>
{s.label ?? s.platform}
</a>
))}
</div>
)}
</div>
{/* Divider tonal shift — no 1px border at 100% */}

View File

@@ -1,5 +1,4 @@
export { Nav } from "./Nav";
export { Footer } from "./Footer";
export { StatusTerminal } from "./StatusTerminal";
export { GridOverlay } from "./GridOverlay";
export { Button } from "./Button";