feat(footer): wire social links from Navigation global instead of hardcoded values
All checks were successful
ci/woodpecker/push/web Pipeline was successful
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:
@@ -1,3 +1,4 @@
|
||||
export const dynamic = "force-dynamic";
|
||||
export const metadata = { title: "Resume" };
|
||||
|
||||
export default function ResumePage() {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
type Params = { slug: string };
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export const dynamic = "force-dynamic";
|
||||
export const metadata = { title: "Writing" };
|
||||
|
||||
export default function WritingIndexPage() {
|
||||
|
||||
@@ -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 */}
|
||||
{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) => (
|
||||
{socials.map((s) => (
|
||||
<a
|
||||
key={s.href}
|
||||
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.label ?? s.platform}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Divider tonal shift — no 1px border at 100% */}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export { Nav } from "./Nav";
|
||||
export { Footer } from "./Footer";
|
||||
export { StatusTerminal } from "./StatusTerminal";
|
||||
export { GridOverlay } from "./GridOverlay";
|
||||
export { Button } from "./Button";
|
||||
|
||||
Reference in New Issue
Block a user