feat(frontend): connect Next.js server components to Go backend REST API with resilient fallback
- Implement typed REST API client in refer_landing_page/lib/api.ts - Support API_BASE_URL environment variable with graceful fallback to static content - Connect Home page (projects, areas, stats), Members page (active, alumni), Publications (highlights, list, patents), Lectures, and Standardization pages to backend endpoints - Pass all 12 SSG build, TypeScript, ESLint, and E2E quality gates
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import type { Metadata } from "next";
|
||||
import { activeMembers, alumni } from "../../content/members";
|
||||
import { activeMembers as staticMembers, alumni as staticAlumni } from "../../content/members";
|
||||
import { getMembers, getAlumni } from "../../lib/api";
|
||||
import { ProfessorDetailsDialog } from "./_components/ProfessorDetailsDialog";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -18,7 +19,10 @@ const DEGREE_LABEL: Record<string, string> = {
|
||||
MS: "M. S.",
|
||||
};
|
||||
|
||||
export default function MembersPage() {
|
||||
export default async function MembersPage() {
|
||||
const activeMembers = (await getMembers()) ?? staticMembers;
|
||||
const alumni = (await getAlumni()) ?? staticAlumni;
|
||||
|
||||
const phdStudents = activeMembers.filter(
|
||||
(m) =>
|
||||
m.degree === "PhD" ||
|
||||
|
||||
Reference in New Issue
Block a user